-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Export archive #280
Comments
Thanks for reporting this! I'll have to look into it... |
Yes, thanks I meant to file an issue about problems with archiving myself but forgot about it. Here's a related issue: ioam/topographica#631 |
The export is not totally fixed in #284. When I run the Exporting tutorial, it does not export in cell 13. Also
It exports the data, but in the directory {notebook}, instead of Exporting.
This goes wrong because the namespace variable is wrong in holoviews/ipyhton/archive.py:69 This namespace is then used on line 139 and 162 |
Thanks, for looking into this. We're trying to get a release candidate out by the end of this week, so hopefully @jlstevens will get to this issue soon. |
I've finally had a chance to have a look... I suspect the issue is that IPython/Jupyter have changed their JavaScript API needed for the fancier parts of the export (trying to get the notebook name and capturing the active notebook). If in the tutorial, you set the options like this instead: hv.archive.auto(skip_notebook_export=True, export_name='Exporting') Then it works again. I feel we ought to document this in the tutorial - I don't like the Javascript code we are using and I don't trust it not to break between Jupyter releases. Anyway, I've just found the issue - we used to do hv.archive.auto(namespace='hv.archive') We could:
I would recommend a combination of 1. and 2. - set the default to |
I'd just consistently move to using |
Ok, the change to the default is implemented in 8037a29. The tutorial is updated in 2ca621e. I am happy to hear any suggestions on how to make the tutorial clearer. I'll close the issue now, but if @vascotenner has any comments on further improvements, I'll reopen the issue and we can discuss them. |
This sounds very fragile. Can the current module name be provided to Javascript from Python initially? Otherwise, can Javascript at least try both "holoviews" and "hv"? |
Or maybe always print a "warning" when enabling archiving, that the hv modules should be imported or renamed to hv or holoviews. The main problem here, is that the ipython kernel does not know it is run from a notebook or a shell or something else. |
I have this quick hack that might do the job: import sys
def get_namespace():
if 'holoviews' not in sys.modules:
raise ImportError('HoloViews does not seem to be imported')
matches = [k for k,v in globals().items()
if not k.startswith('_') and v == sys.modules['holoviews']]
return matches[0] if len(matches) > 0 else None This should be run when Edit: I have to use |
Can't we simply add a |
Ok, I seem to have it working nicely in 5bab92b - I can find the name the user has available to access holoviews and remove the fragile namespace parameter entirely. Now I need to revert my change to the tutorial.... |
Looks much less fragile, thanks. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I cannot get export an archive. No files are exported:
Automatic capture is now enabled. [2015-10-08 09:47:07]
+image
The text was updated successfully, but these errors were encountered: