Elpy: With IPython, args-out-of-range error when opening file

Created on 23 Sep 2016  Â·  6Comments  Â·  Source: jorgenschaefer/elpy

  • Emacs package: elpy 20160903.841
  • Python package: elpy-1.12.0.dist-info

I use the rope backend.

With (elpy-use-ipython): when I open a Python file for the first time, I get the following error message

Debugger entered--Lisp error: (args-out-of-range "Python 3.5.2 (default, Jun 28 2016, 08:46:01) 
Type \"copyright\", \"credits\" or \"license\" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.



" 400)
  string-match("" "Python 3.5.2 (default, Jun 28 2016, 08:46:01) \nType \"copyright\", \"credits\" or \"license\" for more information.\n\nIPython 5.1.0 -- An enhanced Interactive Python.\n?         -> Introduction and overview of IPython's features.\n%quickref -> Quick reference.\nhelp      -> Python's own help system.\nobject?   -> Details about 'object', use 'object??' for extra details.\n\n

" 400)
  ansi-color-filter-apply("Python 3.5.2 (default, Jun 28 2016, 08:46:01) \nType \"copyright\", \"credits\" or \"license\" for more information.\n\nIPython 5.1.0 -- An enhanced Interactive Python.\n?         -> Introduction and overview of IPython's features.\n%quickref -> Quick reference.\nhelp      -> Python's own help system.\nobject?   -> Details about 'object', use 'object??' for extra details.\n\n[?1l[?2004h[?25l[?7l

[?12l[?25h")
  python-shell-output-filter("Python 3.5.2 (default, Jun 28 2016, 08:46:01) \nType \"copyright\", \"credits\" or \"license\" for more information.\n\nIPython 5.1.0 -- An enhanced Interactive Python.\n?         -> Introduction and overview of IPython's features.\n%quickref -> Quick reference.\nhelp      -> Python's own help system.\nobject?   -> Details about 'object', use 'object??' for extra details.\n\n[?1l[?2004h[?25l[?7l

[?12l[?25h")
  comint-output-filter(#<process Python Internal[inbreeding-depression.py]> "Python 3.5.2 (default, Jun 28 2016, 08:46:01) \nType \"copyright\", \"credits\" or \"license\" for more information.\n\nIPython 5.1.0 -- An enhanced Interactive Python.\n?         -> Introduction and overview of IPython's features.\n%quickref -> Quick reference.\nhelp      -> Python's own help system.\nobject?   -> Details about 'object', use 'object??' for extra details.\n\n[?1l[?2004h[?25l[?7l

[?12l[?25h")
  accept-process-output(#<process Python Internal[inbreeding-depression.py]>)
  python-shell-send-string-no-output("import sys;print ('\\n'.join(sys.path))" #<process Python Internal[inbreeding-depression.py]>)
  python-shell-internal-send-string("import sys;print ('\\n'.join(sys.path))")
  semantic-python-get-system-include-path()
  (progn (semantic-python-get-system-include-path))
  (if (and (featurep (quote python)) (not noninteractive)) (progn (semantic-python-get-system-include-path)))
  (when (and (featurep (quote python)) (not noninteractive)) (semantic-python-get-system-include-path))
  eval((when (and (featurep (quote python)) (not noninteractive)) (semantic-python-get-system-include-path)))
  custom-initialize-reset(semantic-python-dependency-system-include-path (when (and (featurep (quote python)) (not noninteractive)) (semantic-python-get-system-include-path)))
  custom-declare-variable(semantic-python-dependency-system-include-path (when (and (featurep (quote python)) (not noninteractive)) (semantic-python-get-system-include-path)) "The system include path used by Python language." :group python :group semantic :type (repeat (directory :tag "Directory")) :set #[(sym val) "\303 \"\210  \304\305\nBC\306\307#\210\310\311\307\"\210)\312\313!\205 

When I open the same file another time, it works. The error reappears if I open another Python file.

Please let me know if I can provide further logs or debugging information.

Bug

Most helpful comment

Hello, and thanks for the report! If you add (setenv "IPY_TEST_SIMPLE_PROMPT" "1") to your config file and restart, does the problem persist?

All 6 comments

Hello, and thanks for the report! If you add (setenv "IPY_TEST_SIMPLE_PROMPT" "1") to your config file and restart, does the problem persist?

Hello! Yes, then it works. I get two (maybe unrelated) warnings though:

Shell native completion is disabled, using fallback

Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native’ was t and "ipython" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list.  Native completions have been disabled locally. 

Yeah, there's a whole lot of confusion going on with IPython 5's new prompt behavior. I hope it'll get fixed in Emacs at some point.

Thank you! Been trying everything to try fix. This worked

@jorgenschaefer Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yitang picture yitang  Â·  4Comments

kirk86 picture kirk86  Â·  5Comments

twangnh picture twangnh  Â·  6Comments

rthompsonj picture rthompsonj  Â·  6Comments

CSRaghunandan picture CSRaghunandan  Â·  5Comments