Open mikedewar opened 11 years ago
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()?
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?
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?
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.
$ 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']
)
Good catch @kern3020. Thanks!
This problems appear again! Why this fix still not merged into the github?
Because d3py is not an active project. Please do check out vincent, which is much better http://vincent.readthedocs.org/en/latest/
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'
=(