ValueError from Jinja PackageLoader
When installing d3graph from pip I got the following error when initializing like this d3 = d3graph.d3graph().
ValueError: The 'd3graph.d3graph' package was not installed in a way that PackageLoader understands.
Error seems to be in line 538 of d3graph.js. I switched that line to the following statement, which solved the problem for me...
jinja_env = Environment(loader=PackageLoader('d3graph', package_path='d3js'))
Not sure if that is just me, or a general issue
Thanks for mentioning it! I have been playing around and in my case it remains working using both approaches. Are you maybe using a Jupyter notebook?
I now added this line because I am not sure what happens to others when I replace it with your line. Can you maybe check whether such a solution works for you?
try:
jinja_env = Environment(loader=PackageLoader(package_name=__name__, package_path='d3js'))
except:
jinja_env = Environment(loader=PackageLoader(package_name='d3graph', package_path='d3js'))
I created a new update. Can you try whether this solves your issue?
pip install -U d3graph
If you still experience issues, let me know and reopen this issue. For now, I assume it is fixed and I am closing this one.