Skip to content

Instantly share code, notes, and snippets.

@takluyver
Created December 8, 2011 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takluyver/1446761 to your computer and use it in GitHub Desktop.
Save takluyver/1446761 to your computer and use it in GitHub Desktop.
IPython issue 1123 traceback
ValueError Traceback (most recent call last)
/home/thomas/code/virtualenvs/ipy-trunk/<ipython-input-1-709e57e53f13> in <module>()
----> 1 get_ipython().magic(u"run 'a \\' b.py'")
/home/thomas/code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s, next_input)
1987 self._magic_locals = sys._getframe(1).f_locals
1988 with self.builtin_trap:
-> 1989 result = fn(magic_args)
1990 # Ensure we're not keeping object references around:
1991 self._magic_locals = {}
/home/thomas/code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/core/magic.pyc in magic_run(self, parameter_s, runner, file_finder)
1583 # get arguments and set sys.argv for program to be run.
1584 opts, arg_lst = self.parse_options(parameter_s, 'nidtN:b:pD:l:rs:T:em:',
-> 1585 mode='list', list_all=1)
1586 if "m" in opts:
1587 modulename = opts["m"][0]
/home/thomas/code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/core/magic.pyc in parse_options(self, arg_str, opt_str, *long_opts, **kw)
274 # If the list of inputs only has 0 or 1 thing in it, there's no
275 # need to look for options
--> 276 argv = arg_split(arg_str,posix)
277 # Do regular option processing
278 try:
/home/thomas/code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/utils/_process_common.pyc in arg_split(s, posix)
164 lex = shlex.shlex(s, posix=posix)
165 lex.whitespace_split = True
--> 166 tokens = list(lex)
167 if is_unicode:
168 # Convert the tokens back to unicode.
/usr/lib/python2.7/shlex.pyc in next(self)
267
268 def next(self):
--> 269 token = self.get_token()
270 if token == self.eof:
271 raise StopIteration
/usr/lib/python2.7/shlex.pyc in get_token(self)
94 return tok
95 # No pushback. Get a token.
---> 96 raw = self.read_token()
97 # Handle inclusions
98 if self.source is not None:
/usr/lib/python2.7/shlex.pyc in read_token(self)
170 print "shlex: I see EOF in quotes state"
171 # XXX what error should be raised here?
--> 172 raise ValueError, "No closing quotation"
173 if nextchar == self.state:
174 if not self.posix:
ValueError: No closing quotation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment