-
Notifications
You must be signed in to change notification settings - Fork 96
IPython.nbformat is nbformat with Jupyter #213
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
Conversation
I've changed the imports (two) in publish.py from IPython.nbformat to nbformat. I'm concerned that this breaks backwards compatibility though. I'm not sure how to assure that if nbformat doesn't exist, Python.nbformat will be.
if nbformat exists as a package, import it instead of the legacy named Python.nbformat . Corrects error thrown by Jupyter.
try: | ||
import nbformat.v4 as nbformat | ||
from nbformat import write as nbwrite | ||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explicitly use except ImportError
, to avoid hiding any other kind of error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your continued patience, which is much more like tutoring.
Would have been done faster. I ran into a problem where the clone on my machine was causing a hang in the desktop app. It took me a long time to figure out that I hard to delete the clone to get the app to unfreeze. (Not I need to submit another bug report- apps shouldn't hang like that!).
On Aug 29, 2015, at 10:37 AM, Steven Silvester [email protected] wrote:
In pymatbridge/publish.py #213 (comment):
@@ -1,5 +1,10 @@
-import IPython.nbformat.v4 as nbformat
-from IPython.nbformat import write as nbwrite
+try:
- import nbformat.v4 as nbformat
- from nbformat import write as nbwrite
+except:
Please explicitly use except ImportError, to avoid hiding any other kind of error.—
Reply to this email directly or view it on GitHub https://github.com/arokem/python-matlab-bridge/pull/213/files#r38262596.
You don't have to submit a new PR, and further commits in this branch will end up in this one. |
Hmm, it looks like we need to add |
I'm even less familiar with Travis. I'll have to look at that later. Not able to today (maybe, but no promises).
|
I mean literally add " nbformat" to the end of that line. — On Sat, Aug 29, 2015 at 11:37 AM, Joseph C. Slater
|
modify the python3.4 env variable so nbformat isn't added for older versions of python. I'm guessing at this point.
I have no idea how to fix this so travis can build it. My other changes seem to work, just not in travis.
No dice. I tried a few things- but I don't know what the problem is.
|
I think the errors you're seeing now have nothing to do with your PR. I think something changed or is temporarily wrong with the Octave installation on Travis. |
Indeed. Looks like something is wrong with Octave. I am trying to debug this on master, with no success so far. |
OK - looks like we might need to recompile the messenger with a current octave (http://octave.1599824.n4.nabble.com/failed-to-load-liboctinterp-so-1-td4660793.html) |
@josephcslater #219 should have fixed the octave issue. Can you rebase on master and see if the travis build passes? |
superseded by #222 |
nbformat is imported if it exists (Jupyter). Otherwise, IPython.nbformat (IPython) .
Not tested in IPython for backwards compatibility. Verified in Jupyter.