Skip to content
This repository

qtconsoleapp 'parse_command_line' doen't like --existing anymore #906

Carreau opened this Issue October 20, 2011 · 1 comment

2 participants

Matthias Bussonnier Min RK
Matthias Bussonnier

on master (87e2f91) Debian squeeze, with some wheezy and sid packages, X forwarding

launching a qtconsole,
python qtconsole
and in another
python qtconsole --existing kernel-9886.json

rise the following:

Traceback (most recent call last):
  File "", line 21, in <module>
    this_dir, 'IPython', 'scripts', 'ipython'
  File "IPython/scripts/ipython", line 7, in <module>
  File "IPython/frontend/terminal/", line 390, in launch_new_instance
  File "IPython/frontend/terminal/", line 291, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "IPython/core/", line 310, in initialize
  File "IPython/frontend/terminal/", line 287, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "IPython/config/", line 388, in parse_command_line
    return self.initialize_subcommand(subc, subargv)
  File "IPython/config/", line 332, in initialize_subcommand
  File "IPython/frontend/qt/console/", line 558, in initialize
    super(IPythonQtConsoleApp, self).initialize(argv)
  File "IPython/core/", line 310, in initialize
  File "IPython/frontend/qt/console/", line 351, in parse_command_line
ValueError: list.remove(x): x not in list

my guess is that at line 331 and 339 the two for a in argv: both match on a flag in argv (which is a copy of self.kernel_argv, line 331) and try to remove a from it twice... hence the crash.

I can fix it, but I'm not sure it will be the only place where this might append...

Min RK

And I fixed this yesterday in the qtconsole_menu PR (cfc7e4a), but I suppose I should put that commit in master straight away, as it's a pretty big deal

Min RK minrk closed this issue from a commit October 19, 2011
Min RK Fix another small bug in stripping kernel args
Problem case: flags and aliases with the same name (e.g. existing)

would attempt removal twice, raising ValueError

closes gh-906
Min RK minrk closed this in bae849b October 20, 2011
Brian E. Granger ellisonbg referenced this issue from a commit January 10, 2012
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.