-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Can't access Preferences in spyder #2984
Comments
I'm also using Mac OSX 10.10.5, Spyder 2.3.8, Python 3.5.1 64bits, Qt 4.8.7, PyQt4 (API v2) 4.11.4 on Darwin.
|
Happening to me also!!! I'd paste the log file, but it looks very similar to what's already here. |
Just installed Anaconda3-2.5.0-Linux-x86_64.sh shipped with Spyder 2.3.8 on Ubuntu14.04. When selecting Preferences I get:
|
Just installed Anaconda3-2.5.0-MacOSX-x86_64.pkg on rMBP under OSX 10.11.3 (15D21)
which includes Spyder 2.3.8. When I go (via Launcher.app) to spyder-app and then select Preferences from the python menu, I get substantially the same result as the above. No point in including yet another log file. Just pleased now to have found I'm not the only one :-) |
I have a completely different setup, but I'm getting a very similar error log. The main difference is that I cannot even open spyder (python3)! Spyder (python2) is working perfectly fine. $ spyder3
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/spyderlib/spyder.py", line 2331, in main
mainwindow = run_spyder(app, options, args)
File "/usr/lib/python3/dist-packages/spyderlib/spyder.py", line 2215, in run_spyder
main.setup()
File "/usr/lib/python3/dist-packages/spyderlib/spyder.py", line 753, in setup
self.inspector = ObjectInspector(self)
File "/usr/lib/python3/dist-packages/spyderlib/plugins/inspector.py", line 407, in __init__
not programs.is_module_installed('jedi', '>=0.8.1')):
File "/usr/lib/python3/dist-packages/spyderlib/utils/programs.py", line 292, in is_module_installed
actver = get_module_version(module_name)
File "/usr/lib/python3/dist-packages/spyderlib/utils/programs.py", line 238, in get_module_version
mod = __import__(module_name)
File "/usr/lib/python3/dist-packages/jedi/__init__.py", line 41, in <module>
from jedi.api import Script, Interpreter, NotFoundError, set_debug_function
File "/usr/lib/python3/dist-packages/jedi/api/__init__.py", line 16, in <module>
from jedi.parser import Parser, load_grammar
File "/usr/lib/python3/dist-packages/jedi/parser/__init__.py", line 21, in <module>
from jedi.parser import tree as pt
File "/usr/lib/python3/dist-packages/jedi/parser/tree.py", line 39, in <module>
from jedi import cache
File "/usr/lib/python3/dist-packages/jedi/cache.py", line 32, in <module>
from jedi import debug
File "/usr/lib/python3/dist-packages/jedi/debug.py", line 17, in <module>
init()
File "/usr/lib/python3/dist-packages/colorama/initialise.py", line 37, in init
wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
File "/usr/lib/python3/dist-packages/colorama/initialise.py", line 76, in wrap_stream
convert=convert, strip=strip, autoreset=autoreset)
File "/usr/lib/python3/dist-packages/colorama/ansitowin32.py", line 67, in __init__
strip = conversion_supported or (not wrapped.closed and not is_a_tty(wrapped))
AttributeError: 'SysOutput' object has no attribute 'closed' Box: $ uname -a
Linux LabInVivo Debian-3.14.17-xenomai-2.6.4 #1 SMP Tue Aug 4 14:13:46 BRT 2015 x86_64 GNU/Linux Python: $ dpkg -l python3.* | grep ii
ii python3.4 3.4.4-2 amd64 Interactive high-level object-oriented language (version 3.4)
ii python3.4-dev 3.4.4-2 amd64 Header files and a static library for Python (v3.4)
ii python3.4-minimal 3.4.4-2 amd64 Minimal subset of the Python language (version 3.4)
ii python3.5 3.5.1-5 amd64 Interactive high-level object-oriented language (version 3.5)
ii python3.5-dev 3.5.1-5 amd64 Header files and a static library for Python (v3.5)
ii python3.5-minimal 3.5.1-5 amd64 Minimal subset of the Python language (version 3.5 Python packages involved in the error log: $ dpkg -l python3-{colorama,jedi,spyderlib}
...
ii python3-colorama 0.3.6-1 all Cross-platform colored terminal text in Python -
ii python3-jedi 0.9.0-1 all autocompletion tool for Python 3
ii python3-spyderlib 2.3.8+dfsg1-1 all Python IDE for scientists (Python 3 modules) |
This seems to be the same issue as tartley/colorama#85 which is fixed by tartley/colorama@1244a00. As suggested in the discussion at davidhalter/jedi-vim#522, downgrading colorama to a version before 0.3.6 also resolves the problem (I checked and it did for me). |
Just wanted to ditto the above, I was having this issue and it was resolved by running |
@jitseniesen, thanks a lot for the reference! I'll try to patch |
For me the issue appears fixed by running
Thank you. |
conda install colorama=0.3.3 fixed this for me as well. Thank you! |
In debian, running |
Thank you for posting the "conda install" info, this fixed it for me and this problem was driving me crazy! I am glad there are folks who can figure these things out and then take the time to post and help others. |
pip install colorama==0.3.5 fixed for me |
Look at https://github.com/ipython/ipython/pull/7765/commits to see how ipython community solved this problem. We need not to patch colorama if we could add something like: class SysOutput(QObject):
@property
def closed(self):
return False # this could be probably more sofisticated :) to spyderlib/widgets/internalshell.py edit: added @Property decoration |
Isn't this a colorama bug? |
I am not sure. (And dont know who could be judge :) . But it seems that "closed" is standard property of IOBase https://docs.python.org/3/library/io.html#module-io (which define interface for file-objects. See: https://docs.python.org/3/glossary.html#term-file-object ) BTW class SysOutput has also this similar functionality: # We need to add this method to fix Issue 1789
def flush(self):
pass See: #1789 FYI: Under ubuntu 16.04, after colorama upgrade, spyder3 does not start. |
How did you install Spyder? |
Just to add, on gentoo, spyder3.0.0dev, qt5.5.1 and pyqt5.5.1 it is the same. On colorama 0.3.6 spyder didn't start, but on 0.3.5 it is working fine. I didn't installed spyder, I'm running |
I added @Property decoration to "patch" code above. Sorry I had high fever yesterday so I tested only if spyder starts. (and without decoration it "returns" True and not False!) I am on other machine I will check it later, but my spyder (98% probability) and colorama (for sure) are installed via apt-get from standard ubuntu repository. Ubuntu 16.04 is in Beta, but it's still big problem I am afraid. I think we have implement full interface defined in IOBase (because we redirect sys.stdout and sys.stderr (in interpreter.py)) if we like to guarantee compatibility with colorama in the future:
I am not sure about RawIOBase, BufferedIOBase, TextIOBase. |
It seems that IOBase is not enough. See: python3 -c "import sys;print(dir(sys.stdout))" |
I had this problem as well. Similar internal console output. I'm on Mac OS X El Capitan. Home-brewed python3. spyder 3.0.0b2. with colorama v 0.3.6, the preference pane will not open at all. |
Thanks for the tips folks! My system is OSX Yosemite, and a fresh installation of anaconda (Python 3.5.1 |Anaconda 2.5.0). |
Given the amount of people coming across this issue, I think it makes sense for us to add a property Given the uncertainty around what colorama expects and that requirements |
Ok, I'll do the change and release 2.3.9 to fix it. |
BTW colorama 0.3.7 made fix 84 so spyder3 is now working on ubuntu 16.04 by default... FYI they added function: def is_stream_closed(stream):
return not hasattr(stream, 'closed') or stream.closed So probably who downgraded could try upgrade again (but see edit below!) (@astromz, @AlJohri, @nknezek, @EmZhu ) Edit: Sorry! If I understand well then colorama will deduce that SysOutput is closed - so we very probably still need to patch if we want to have colorama working |
Fix worked for me as well
Will try to upgrade to 0.3.7 as 0.3.6 was installed with the original 3.5 env nextly. Thanks and cheers! |
Tried colorama downgrade solution without success: I am runnig Anaconda2 4.0.0 on Windows 7 Pro. But when I click on Tools->Preferences in Spyder, I still get the error message: C:\Program Files\Anaconda2\lib\site-packages\nbformat\current.py:19: UserWarning: nbformat.current is deprecated.
|
Have the same problem as described above, opening the preferences gives error messages Version and main components
Optional dependencies
I use spyder 2.39 with python 3.5.2 and tried colorama 0.3.7 and colorama 0.3.3
|
Description
Just installed Anaconda and opened Spyder(Python 3.5) on my Mac running OS X 10.10.5. When I go to the python menu and select Preferences, I get the following error that shows up in the internal console:
Version and main components
Optional dependencies
The text was updated successfully, but these errors were encountered: