Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vega_template.html not installed #69

Open
mikedewar opened this issue May 1, 2013 · 8 comments
Open

vega_template.html not installed #69

mikedewar opened this issue May 1, 2013 · 8 comments

Comments

@mikedewar
Copy link
Owner

when running a vega example I get

IOError: [Errno 2] No such file or directory: '/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/d3py-0.2.3-py2.7.egg/d3py/vega_template.html'

=(

@wrobstory
Copy link
Contributor

Uh oh! I'll jump on it tonight and make sure everything is working properly again, perhaps with a new PR with an updated version of the Vega stuff that can do maps, etc.

When does it break in the example? fig.show()?

@wrobstory
Copy link
Contributor

I'm a little stumped, Mike. The examples work fine on both a windows machine and my mac, each running a different flavor of Python 2.7.

One thing I did change in the PR you just merged is that .html is now being loaded with the pkg_resources module, using resource_string . Are the normal examples working for you, or do those fail to find the d3py_template.html as well? It could be related to the distribute/setuptools packages, but in that case import pkg_resources would have failed.

It could also be that we don't have a MANIFEST.in file detailing that all .html should be included in the package. If you go to the path specified by the error, is the html living there?

@mikedewar
Copy link
Owner Author

The path specified by the error didn't exist - no html. The original template (which I'm in the process of removing references to) was there and the original set of examples work fine. Once I copied the vega template to the spot specified by the location it worked fine.

I've not much clue how to bundle python together for install, nor good instinct if this is something daft I've done. Would it be worth keeping this open and, if others come across the same problem, we can worry then?

@wrobstory
Copy link
Contributor

Yep, lets keep it open.

I'll put some work into doing some proper package building, so that eventually we can push to PyPI. pkg_resources is a start, because now its zip safe.

@kern3020
Copy link

kern3020 commented May 2, 2013

    $ git diff setup.py 
    diff --git a/setup.py b/setup.py
    index 613cf4d..9dd5a67 100644
    --- a/setup.py
    +++ b/setup.py
    @@ -11,6 +11,6 @@ setup(
         author_email='md@bit.ly',
         url='https://github.com/mikedewar/D3py',
         packages=['d3py', 'd3py.geoms', ],
    -    package_data={'d3py': ['d3.js','d3py_template.html']},
    +    package_data={'d3py': ['d3.js','d3py_template.html', 'vega_template.html']},
         requires=['pandas','networkx']
     )

@wrobstory
Copy link
Contributor

Good catch @kern3020. Thanks!

@honglei
Copy link

honglei commented Sep 26, 2014

This problems appear again!
Why this fix still not merged into the github?

@mikedewar
Copy link
Owner Author

Because d3py is not an active project. Please do check out vincent, which is much better http://vincent.readthedocs.org/en/latest/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants