Configparser error leads to crash of Spyder 3 under Python(x,y) - windows-7

During its startup, Spyder3 IDE crashes under Python(x,y). I have installed a Python(x,y) distribution (2.7.10.0) of Python2.7 under Windows 7 and after updating the package spyder to the most recent version (with pip: V3.0.x), it does not restart anymore. Resetting the spyder config does not help.
It is reproducible as I checked it on 3 computers and also with the Enthought distribution, it has the same problem. Only under Anaconda, it keeps working properly.
The error message is stored in the contents of file spyder_crash.log:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\spyder\app\mainwindow.py", line 3001, in main
mainwindow = run_spyder(app, options, args)
File "c:\python27\lib\site-packages\spyder\app\mainwindow.py", line 2905, in run_spyder
main.setup()
File "c:\python27\lib\site-packages\spyder\app\mainwindow.py", line 1010, in setup
from xy.config import DOC_PATH as xy_doc_path
File "c:\python27\lib\site-packages\xy\config.py", line 40, in <module>
CONF = UserConfig('xy', defaults=DEFAULTS, version=__version__, subfolder='.xy')
File "c:\python27\lib\site-packages\xy\userconfig.py", line 110, in __init__
if version != self.get_version(version):
File "c:\python27\lib\site-packages\xy\userconfig.py", line 130, in get_version
return self.get(self.DEFAULT_SECTION_NAME, 'version', version)
File "c:\python27\lib\site-packages\xy\userconfig.py", line 269, in get
value = cp.ConfigParser.get(self, section, option, raw=self.raw)
File "c:\python27\lib\site-packages\backports\configparser\__init__.py", line 811, in get
d)
File "c:\python27\lib\site-packages\backports\configparser\__init__.py", line 384, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "c:\python27\lib\site-packages\backports\configparser\__init__.py", line 397, in _interpolate_some
rawval = parser.get(section, option, raw=True, fallback=rest)
TypeError: get() got an unexpected keyword argument 'raw'
PS: I see that I could post an issue directly on Github but there are over 600 issues open. Maybe there is someone who knows a fix directly.
Different causes that Spyder crashes:
Spyder IDE won't start WinPython-64bit- 2.7.10.2
Broken links and probably different cause - Spyder/Pythonxy crashes
Edit:
Installation details:
C:\Users\strpeter>pip install spyder
Successfully installed configparser-3.5.0 jupyter-core-4.2.1 nbformat-4.2.0
setuptools-30.0.0 spyder-3.0.2
When uninstalling configparser, as recommended in the comment below, pythonw.exe stops working during the initialization of spyder3. I have no details at hand to report about the crash.
C:\Users\strpeter>pip uninstall configparser
Uninstalling configparser-3.5.0:
c:\python27\lib\site-packages\backports\configparser\__init__.py
c:\python27\lib\site-packages\backports\configparser\__init__.pyc
c:\python27\lib\site-packages\backports\configparser\helpers.py
c:\python27\lib\site-packages\backports\configparser\helpers.pyc
c:\python27\lib\site-packages\configparser-3.5.0-py2.7-nspkg.pth
c:\python27\lib\site-packages\configparser-3.5.0-py2.7.egg-info
c:\python27\lib\site-packages\configparser.py
c:\python27\lib\site-packages\configparser.pyc
Proceed (y/n)? y
Successfully uninstalled configparser-3.5.0

(Spyder developer here) This is an error between PythonXY and Spyder. I opened an issue about it, which we're going to solve in Spyder 3.1.0 (to be released in mid January/2017).

This might be due to incompatibilities due to different Qt wrappers. To test this in Enthought Python, please open a Canopy Command Prompt (or otherwise ensure that Enthought Python is your default python). Then ensure that PyQt is installed and make it the default Qt wrapper:
enpkg pyqt
set QT_API=pyqt
Now does Spyder 3 run ok?

Related

Spyder 5 ModuleNotFoundError

I have just updated my spyder4 to spyder5 as:
conda update spyder
as I try to launch spyder it gives an Error : No module named 'qdarkstyle.colorsystem'
Here is the complete information :
Traceback (most recent call last):
File "/home/sina/anaconda3/envs/py37/bin/spyder", line 11, in <module>
sys.exit(main())
File "/home/sina/anaconda3/envs/py37/lib/python3.7/site-packages/spyder/app/start.py", line 210, in main
from spyder.app import mainwindow
File "/home/sina/anaconda3/envs/py37/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 72, in <module>
from spyder.app import tour
File "/home/sina/anaconda3/envs/py37/lib/python3.7/site-packages/spyder/app/tour.py", line 37, in <module>
from spyder.utils.qthelpers import add_actions, create_action
File "/home/sina/anaconda3/envs/py37/lib/python3.7/site-packages/spyder/utils/qthelpers.py", line 34, in <module>
from spyder.utils.icon_manager import ima
File "/home/sina/anaconda3/envs/py37/lib/python3.7/site-packages/spyder/utils/icon_manager.py", line 23, in <module>
from spyder.utils.palette import QStylePalette, SpyderPalette
File "/home/sina/anaconda3/envs/py37/lib/python3.7/site-packages/spyder/utils/palette.py", line 12, in <module>
from qdarkstyle.colorsystem import Blue, Gray
ModuleNotFoundError: No module named 'qdarkstyle.colorsystem'
I would appreciate any comments on it.
Met with similar problem. I reverted back to previous version till the devs sort the problem out.
conda install spyder=4.2.5
Same problem on Win. To rollback, using miniconda command is the same:
conda install spyder=4.2.5
If you have activated a dedicated environment (named "xyz" here) first go to "base" and update the package repository (in miniconda its conda update conda), then activate the environment you want to operate on. Note: the package repository resides only in "base", however you can have as many custom environments, each installing and running its own version of Sypder (and any other packages installed, dedicated to that environment)
activate base #go to the base to update the package repository first
conda update conda #in miniconda just update conda, not anaconda
activate xyz
conda install spyder=4.2.5
Version 5 reportedly unstable till May-June
For all people that have this problem right now: if you want to use a
very stable and well tested Spyder version, please stay with our
latest version of Spyder 4 (we plan to maintain it for two more months
with small bug fixes). Spyder 5 is still a work in progress and it'll
take us two or three months until reaches the same level of stability.
ccordoba12 https://github.com/spyder-ide/spyder/issues/15113
If you want to play with 5.0 first in a new environment named "tmp":
conda create --name tmp
activate tmp
conda install spyder=5.0.0
Later, can easily blow away that entire environment and everything in it.
conda env remove --name tmp
I tried conda install -c conda-forge qdarkstyle=3.0.2 and it worked. But yeah there are few other bugs but spyder does seem to start.
They notified me that the problem had been fixed and how to get a working version. The remedy is
conda install spyder=5.0.0=*_1
I did so and it is working as expected.
On windows 10 using conda install qdarkstyle=3.0.2
return spyder to ver 4.2.3, but it is working. Anaconda typically fix such a bugs after few days.
I tried downgrading qdarkstyle package using conda install qdarkstyle 2.8.1 and it worked for me. Win 10 64 bit anaconda spyder IDE
On Windows 10 using WinPython and Spyder 5.0.3. I was having this issue with a local module import.
The simple fix was that my PYTHONPATH had gotten reset in the upgrade, and adding back in the relevant folders fixed this.

Anaconda Navigator won't launch, download_api error (Windows 10)

Last night I ran a Windows update and this morning Anaconda Navigator hangs when I try to launch it. After googling I ran some updates in Anaconda prompt:
conda update
conda update anaconda-navigator
And then when I try to launch anaconda navigator from the prompt I get this error:
2019-03-01 09:23:00,212 - ERROR download_api._get_url:416
Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "C:\Users\xxxx\Anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window.py", line 539, in setup
self.post_setup(conda_data=conda_data)
File "C:\Users\xxxx\Anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window.py", line 576, in post_setup
self.tab_home.setup(conda_data)
File "C:\Users\xxxx\Anaconda3\lib\site-packages\anaconda_navigator\widgets\tabs\home.py", line 169, in setup
self.set_applications(applications, packages)
File "C:\Users\xxxx\Anaconda3\lib\site-packages\anaconda_navigator\widgets\tabs\home.py", line 204, in set_applications
apps = self.api.process_apps(applications, prefix=self.current_prefix)
File "C:\Users\xxxx\Anaconda3\lib\site-packages\anaconda_navigator\api\anaconda_api.py", line 888, in process_apps
versions=[vsdata.get('productVersion')],
AttributeError: 'str' object has no attribute 'get'
I use Jupyter Notebook and Spyder and this is causing me a major headache. Thanks in advance!
There's another solution (not the best, but it works). Anaconda can't retrieve vscode version for any reason.
You need to replace line 888 in file "C:\Users\xxxx\Anaconda3\lib\site-packages\anaconda_navigator\api\anaconda_api.py"
from versions=[vsdata.get('productVersion')], to versions=["1b8e8302e405050205e69b59abb3559592bb9e60"],
After lots of restarts and lots of googling I found a simple fix:
conda update navigator-updater
It works...for now
For me it worked only when I'm connected to the internet. Offline, it fails to start.

Unable to run Autokey Ubuntu 18.04

I am relatively new to Linux/Ubuntu (so please take it easy on me) and I am trying to install Autokey to use the text expansion functionality. I have tried installing it from the instructions on the Github page here - https://github.com/autokey/autokey#installation
However, no matter whether I follow the installation process under the Ubuntu/Mint/Debian section or the instructions to install via pip I cannot seem to get the program working.
The installation seems to be successful (running a 'which' command gives the path installed) but clicking on the icon does not launch the program.
I have also tried to install directly from Ubuntu/GNOME software manager but that also will not launch the program once installed.
I have tried installing both the GTK and QT frontends and neither will launch. I don't get an error message or anything. I have opened up the System Monitor to see if a process even appears (however briefly) and there's nothing.
Typing autokey-gtk into Terminal gives:
/usr/local/lib/python2.7/dist-packages/autokey/gtkapp.py:24: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, Gdk, GObject, GLib
Traceback (most recent call last):
File "/usr/local/bin/autokey-gtk", line 20, in <module>
from autokey.gtkapp import Application
File "/usr/local/lib/python2.7/dist-packages/autokey/gtkapp.py", line 28, in <module>
import service, monitor
File "/usr/local/lib/python2.7/dist-packages/autokey/service.py", line 21, in <module>
from iomediator import Key, IoMediator
File "/usr/local/lib/python2.7/dist-packages/autokey/iomediator.py", line 107, in <module>
from interface import *
File "/usr/local/lib/python2.7/dist-packages/autokey/interface.py", line 29, in <module>
from Xlib import X, XK, display, error
ImportError: No module named Xlib
Can anyone please help? Thank you.
I am a newbie too and installed Autokey 0.90.4, which did not work for me either. Someone suggested I try 0.95.1 because the other version is 7 years old.
I installed the new version with some acrobatics from the Autokey Github page, using the PIP method. At 1st it did not work, but after doing import setuptools it did. That might be a coincidence since it was after installation of the Ak package itself.
I know this sounds convoluted, but I am not familiar (yet?) with Linux. Anyway 0.95 works for me.
install module python-xlib and it will work, like this:
On Deb:
apt install python3-xlib
You might later need python autokey module as well:
pip install autokey

Anaconda: An unexpected error ocurred on Navigator start-up

I had installed Anaconda, I had managed to launch it and then use R or python, and today I can no longer launch it and I get this error (I get the same error when I run the software in administrator mode)
An unexpected error ocurred on Navigator start-up
psutil.AccesDenied(pid=5740)
Traceback (most recent call last):
File "C:\Users\user\Anaconda3\lib\site-packages\psutil\_pswindows.py", line 620, in wrapper
return fun(self, *args, **kwargs)
File "C:\Users\user\Anaconda3\lib\site-packages\psutil\_pswindows.py", line 690, in cmdline
ret = cext.proc_cmdline(self.pid)
PermissionError: [WinError 5] Access Denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\Anaconda3\lib\site-packages\anaconda_navigator\exceptions.py", line 75, in exception_handler
return_value = func(*args, **kwargs)
File "C:\Users\user\Anaconda3\lib\site-packages\anaconda_navigator\app\start.py", line 108, in start_app
if misc.load_pid() is None: # A stale lock might be around
File "C:\Users\user\Anaconda3\lib\site-packages\anaconda_navigator\utils\misc.py", line 384, in load_pid
cmds = process.cmdline()
File "C:\Users\user\Anaconda3\lib\site-packages\psutil\__init__.py", line 701, in cmdline
return self._proc.cmdline()
File "C:\Users\user\Anaconda3\lib\site-packages\psutil\_pswindows.py", line 623, in wrapper
raise AccessDenied(self.pid, self._name)
psutil.AccessDenied: psutil.AccessDenied (pid=5740)
I follow the suggestions:
https://github.com/ContinuumIO/anaconda-issues/issues/6006
,
https://github.com/ContinuumIO/anaconda-issues/issues/1984
These commands helped me:
conda update anaconda-navigator
conda update navigator-updater
anaconda-navigator --reset
I use the anaconda in win10 x64 (python3.x) and I got this problem this morning as well. All the things had been done in anaconda was that I installed a package called pywinauto, then I turned off the computer and went home.
I follow the suggestion from https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/4hBTDOcDzgo by lan, I update the anaconda by using the command.
conda update anaconda-navigator
However, the error occurred the same.
Then I reboot the computer and restart the anaconda, magic thing happens! the anaconda works fine!
I think maybe some configuration has been changed when I install the new package, and this change is conflicted with the current configuration which you need to reboot the computer to fix it. you should note that turn off computer then restart it is not equal to reboot it.
So, just reboot the computer and it will be fine.
Facing the same error initially, I tried other solutions given here by executing the commands in anaconda terminal but nothing works in my case as I was getting the following error on executing command
Load Error: invalid yaml at position 0
This means .condarc file is either corrupted due to some reason or there may be some changes in it.
The solution that worked for me is to delete .condarc. As the .condarc configuration file follows simple YAML syntax.
.condarc is automatically created in your home directory the time you run anaconda navigator.
Conda will re-create it, again.
Hope it Helps!!
Try removing .condarc from your directory and check if it works. I had the same issue and it worked for me. I hope it works for you.
I had same Problem , when i tried to update the anaconda navigator, there was conda memory error...Finally,Simple Reset Command Worked for me...!!
anaconda-navigator --reset
If the above solutions are not work,just turn off the proxy.
enter image description here
I faced the same issue.I used the v2ray and proxyfier throught the connect internet.Then I exit the proxyfier and v2ray and reopen the anaconda navigator.finally slove the problem.

Problems finding modules after installing SimpleCV 1.3

I have recently installed SimpleCV on Windows 10 from the superpack. Everything went well during the installation, and I was able to successfully run the first example problem in "Practical Computer Vision with SimpleCV" (good book, btw) from within IDLE. Here's the code:
from SimpleCV import Camera, Display, Image
cam = Camera()
display = Display()
img = cam.getImage()
img.save(display)
Simple enough, and it worked fine. Where I ran into problems was when I tried to start up the SimpleCV console. First of all, no link was created on the Windows desktop, and there was nothing for SimpleCV on the Start menu. So, I tried the other methods listed in the book. First, from the console, I tried to run it as a Python module:
C:\User> python -m SimpleCV.init
And what I got back was:
ERROR:
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\lib\site-packages\SimpleCV\__init__.py", line 18 in <module>
from SimpleCV.Shell import *
File "C:\Python27\;ib\site-packages\SimpleCV\Shell\__init__.py", line 1, in <module>
from Shell import *
File "C:\Python27\lib\site-packages\SimpleCV\Shell\Shell.py", line 54, in <module>
raise(e)
ImportError: No module named IPython
Next, I tried the listed alternative: just starting python and importing and executing the Shell. Entering:
>>> from SimpleCV import Shell
resulted in the same error as above.
I also tried installing ipython by running pip. But, it looks like pip didn't get installed either.
So, what environmental variable did the installation program not set correctly? Just so you know, I posted this same question on the SimpleCV site, but have not received a response as of yet.
--- 23 Dec 2015
Chipping away at this. Read the banner on setuputils install. Ran Python27\Scripts\easy_install.exe. Can now call pip. However, entering this at the command line:
C:\Users> pip install ipython
gives this error:
C:\Python27\lib\site--packages\pip-7.1.2-py2.7.egg\pip\_vendor\requests\packages\urllib3\util\ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cuase certain SSL connections to fail. For more information, see...
So, I'm making progress. Any suggestions?
Have you tried to install ipython from source code?
$ tar -xzf ipython.tar.gz
$ cd ipython
$ python setup.py install
See https://ipython.org/ipython-doc/3/install/install.html
There are a lot of requirements more. I recommend the SimpleCV's github repository instructions https://github.com/sightmachine/SimpleCV#windows-8

Resources