Skip to content
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

%notebook fails in qtconsole #1487

Closed
timmie opened this issue Mar 10, 2012 · 2 comments
Closed

%notebook fails in qtconsole #1487

timmie opened this issue Mar 10, 2012 · 2 comments
Labels
Milestone

Comments

@timmie
Copy link

timmie commented Mar 10, 2012

%notebook -e foo.py
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/opt/source/packaging/pandas/pandas_build_virtenv/<ipython-input-245-d2b2edf081ed> in <module>()
----> 1 get_ipython().magic(u'notebook -e foo.py')

/usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s, next_input)
   1996                 self._magic_locals = sys._getframe(1).f_locals
   1997             with self.builtin_trap:
-> 1998                 result = fn(magic_args)
   1999             # Ensure we're not keeping object references around:

   2000             self._magic_locals = {}

/usr/lib/python2.7/dist-packages/IPython/core/magic.pyc in magic_notebook(self, s)
   3547                 cells.append(current.new_code_cell(prompt_number=prompt_number, input=input))
   3548             worksheet = current.new_worksheet(cells=cells)
-> 3549             nb = current.new_notebook(name=name,worksheets=[worksheet])
   3550             with open(fname, 'w') as f:
   3551                 current.write(nb, f, format);

TypeError: new_notebook() got an unexpected keyword argument 'name'


@takluyver
Copy link
Member

Can you test PR #1480, which should fix this?

fperez added a commit that referenced this issue Apr 15, 2012
Fix %notebook magic, etc. nbformat unicode tests and fixes.

* json.writes always gives unicode, so that `current.writes` can be trusted to give the same interface
* setup base TestCase for nbformat tests, to consolidate code, and better test both file formats
* add tests for reading/writing to files
* allow `name` as kwarg to new_notebook to avoid unnecessary breakage of previous API.
* remove fallback to xml, which would hide corrupt notebook files behind a nonsensical 'xml unsupported' message.

Closes #1545, #1487.
@fperez
Copy link
Member

fperez commented Apr 15, 2012

Closed by #1480.

@fperez fperez closed this as completed Apr 15, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Fix %notebook magic, etc. nbformat unicode tests and fixes.

* json.writes always gives unicode, so that `current.writes` can be trusted to give the same interface
* setup base TestCase for nbformat tests, to consolidate code, and better test both file formats
* add tests for reading/writing to files
* allow `name` as kwarg to new_notebook to avoid unnecessary breakage of previous API.
* remove fallback to xml, which would hide corrupt notebook files behind a nonsensical 'xml unsupported' message.

Closes ipython#1545, ipython#1487.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants