Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
wants to merge 6 commits into from
Closed

IPython.nbformat is nbformat with Jupyter #213

wants to merge 6 commits into from

Conversation

josephcslater
Copy link
Contributor

nbformat is imported if it exists (Jupyter). Otherwise, IPython.nbformat (IPython) .

Not tested in IPython for backwards compatibility. Verified in Jupyter.

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:
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@blink1073
Copy link
Collaborator

You don't have to submit a new PR, and further commits in this branch will end up in this one.

@blink1073
Copy link
Collaborator

Hmm, it looks like we need to add nbformat explicitly to the .travis.yml file here: https://github.com/arokem/python-matlab-bridge/blob/master/.travis.yml#L27

@josephcslater
Copy link
Contributor Author

I'm even less familiar with Travis. I'll have to look at that later. Not able to today (maybe, but no promises).


www.cecs.wright.edu/~jslater

On Aug 29, 2015, at 11:47 AM, Steven Silvester [email protected] wrote:

Hmm, it looks like we need to add nbformat explicitly to the .travis.yml file here: https://github.com/arokem/python-matlab-bridge/blob/master/.travis.yml#L27


Reply to this email directly or view it on GitHub.

@blink1073
Copy link
Collaborator

I mean literally add " nbformat" to the end of that line.  


Sent from Mailbox

On Sat, Aug 29, 2015 at 11:37 AM, Joseph C. Slater
[email protected] wrote:

I'm even less familiar with Travis. I'll have to look at that later. Not able to today (maybe, but no promises).

www.cecs.wright.edu/~jslater

On Aug 29, 2015, at 11:47 AM, Steven Silvester [email protected] wrote:

Hmm, it looks like we need to add nbformat explicitly to the .travis.yml file here: https://github.com/arokem/python-matlab-bridge/blob/master/.travis.yml#L27


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub:
#213 (comment)

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.
@josephcslater
Copy link
Contributor Author

No dice. I tried a few things- but I don't know what the problem is.
Joe

On Aug 29, 2015, at 2:58 PM, Steven Silvester [email protected] wrote:

I mean literally add " nbformat" to the end of that line.


Sent from Mailbox

On Sat, Aug 29, 2015 at 11:37 AM, Joseph C. Slater
[email protected] wrote:

I'm even less familiar with Travis. I'll have to look at that later. Not able to today (maybe, but no promises).

www.cecs.wright.edu/~jslater

On Aug 29, 2015, at 11:47 AM, Steven Silvester [email protected] wrote:

Hmm, it looks like we need to add nbformat explicitly to the .travis.yml file here: https://github.com/arokem/python-matlab-bridge/blob/master/.travis.yml#L27


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub:
#213 (comment)

Reply to this email directly or view it on GitHub #213 (comment).

@blink1073
Copy link
Collaborator

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.

@arokem
Copy link
Owner

arokem commented Sep 7, 2015

Indeed. Looks like something is wrong with Octave. I am trying to debug this on master, with no success so far.

@arokem
Copy link
Owner

arokem commented Sep 7, 2015

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)

@isbadawi
Copy link
Collaborator

@josephcslater #219 should have fixed the octave issue. Can you rebase on master and see if the travis build passes?

@arokem arokem mentioned this pull request Sep 21, 2015
@arokem
Copy link
Owner

arokem commented Sep 21, 2015

superseded by #222

@arokem arokem closed this Sep 21, 2015
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

Successfully merging this pull request may close these issues.

4 participants