-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
IPython REPL will not start when startup script specified #976
Comments
Wow, this bug has been here for years... thanks for finding it! Our next release (coming very soon) isn't going to have the fix, but once I've written one up you'll be able to apply it manually to |
Just to confirm - in Interactive Options, what value (or maybe just spaces?) do you have for |
I do use a startup script (something I'm used to coming from MATLAB). Maybe I shouldn't? This is what was in there. C:\Users\vu062605\Documents\Visual Studio 2013\Projects\TunnelTools\TunnelTools\setupinteractive.py I removed the startup script and sure enough, the REPL seems to work in IPython mode. I was hoping switching to IPython mode would fix my actual issue (which is wanting to be able to make plots from matplotlib without each plot window hanging up and "Not Responding"). But that's a question for a different thread I think. |
Not using the startup script is a workaround, as the bug is in our code that loads the startup script. I'd rather fix the bug than tell you not to use it though. The matplotlib issue should be helped by changing to IPython mode. The main difference is that matplotlib will use a different backend:
vs normal mode:
The |
Adds missing str->bytes conversion for Python 3.x.
So if you click through to the commit linked above, you'll see the changes you can make to your own install to get the fix right away. |
Thanks! That fixed the REPL issue. I still can't get matplotlib to create a window though.
I get the same backend in standard mode
Should that be the case? |
I figured out if I set Interactive Mode to IPython w/o Pylab, then enter
as the first thing I do (before the REPL has started), everything works as expected. I'm not sure what that does exactly but I'm running now. Thanks again for your help and looking at this. I was beginning to start looking at other IDEs. |
I am new to Python and Visual Studio and having issues getting IPython to work (I need to be able interactively plot data using matplotlib).
I've gone into Python Tools\Interactive Windows\Interactive Mode and set it to IPython. Once I start typing in the REPL I get the following error:
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.2\visualstudio_py_repl.py", line 1370, in
_run_repl()
File "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.2\visualstudio_py_repl.py", line 1366, in _run_repl
BACKEND.execution_loop()
File "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.2\visualstudio_ipython_repl.py", line 308, in execution_loop
self.execute_file_as_main(self.launch_file, None)
File "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.2\visualstudio_ipython_repl.py", line 291, in execute_file_as_main
contents = f.read().replace("\r\n", "\n")
TypeError: expected bytes, bytearray or buffer compatible object
The Python REPL process has exited
I'm using Visual Studio Pro 2013 with PTVS 2.2
Python 3.4
IPtython 3.0
Any insight would be appreciated.
The text was updated successfully, but these errors were encountered: