Recently I have had a problem on debugging in spyder 5.1.1. I have checked online and note that they have some issue on debugging in spyder version 5. I have also tried to install spyder 5.2.2 but still not able to debug so I decided the downgrade to Spyder 4. However, it not working either , so I tired to uninstall Spyder and reinstall spyder 2.4.2 in anaconda. After installed , I cannot open spyder and I got the following message from a pop up window when I tried to launch spyder in Anaconda:
Application spyder launch may have produced errors:
Traceback (most recent call last):
File "C:\Users\user\anaconda3\Scripts\spyder-script.py", line 10, in
sys.exit(main())
File "C:\Users\user\anaconda3\lib\site-packages\spyder\app\start.py", line 214, in main
mainwindow.main(options, args)
File "C:\Users\user\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3638, in main
mainwindow = create_window(app, splash, options, args)
File "C:\Users\user\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3496, in create_window
main.setup()
File "C:\Users\user\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 788, in setup
from spyder.plugins.console.plugin import Console
File "C:\Users\user\anaconda3\lib\site-packages\spyder\plugins\console\plugin.py", line 40, in
from spyder.api.plugins import SpyderPluginWidget
File "C:\Users\user\anaconda3\lib\site-packages\spyder\api\plugins_init_.py", line 25, in
from .old_api import SpyderPlugin, SpyderPluginWidget # noqa
File "C:\Users\user\anaconda3\lib\site-packages\spyder\api\plugins\old_api.py", line 22, in
from spyder.utils.icon_manager import ima
ImportError: cannot import name 'ima' from 'spyder.utils.icon_manager' (C:\Users\user\anaconda3\lib\site-packages\spyder\utils\icon_manager.py)
I have the same questions on github but still have further problem on that after getting the advice from other experts. (https://github.com/spyder-ide/spyder/issues/17920#issue-1239365635) What should I do so that I could open the Spyder again?
Related
I was running python 2.7 in Anaconda2 in spyder 4 up until today with no problems. But now I keep getting the same error, when I make an environment and install python 2.7 and spyder in it:
Traceback (most recent call last):
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 3718, in main
mainwindow = run_spyder(app, options, args)
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 3557, in run_spyder
main = MainWindow(options)
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 426, in init
from spyder.preferences.runconfig import RunConfigPage
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/preferences /runconfig.py", line 482, in
class RunConfigPage(GeneralConfigPage):
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/preferences/runconfig.py", line 487, in RunConfigPage
ICON = ima.icon('run')
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/utils/icon_manager.py", line 394, in icon
directory=_resource['directory'])
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/qtawesome/init.py", line 178, in load_font
return _instance().load_font(prefix, ttf_filename, charmap_filename, directory)
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/qtawesome/init.py", line 54, in _instance
'materialdesignicons-webfont-charmap.json')
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/qtawesome/iconic_font.py", line 206, in init
super().init()
TypeError: super() takes at least 1 argument (0 given)
This started happening after I reinstalled the package "pydicom" in the environment, and now nothing works. I have reinstalled anaconda2, used spyder --reset, and all other common suggestions.
Spyder 3.3.6 works in the base environment, but every time I make a new environment and install spyder in this, I get the same error. Any suggestions?
(Spyder maintainer here) To fix this problem, you need to install QtAwesome 0.7.3 in your environment. For that, please use the following command:
conda install qtawesome=0.7.3
I recently created a new environment with Anaconda Navigator and installed in it the Spyder IDE version 4.1.1. The problem is, whenever I try to launch it (via Anaconda Navigator), it raises me the following exception, and doesn´t launch at all:
Traceback (most recent call last):
File "C:\Users\marco\anaconda3\envs\Webscraping_env\Scripts\spyder-script.py", line 10, in
sys.exit(main())
File "C:\Users\marco\anaconda3\envs\Webscraping_env\lib\site-packages\spyder\app\start.py", line 205, in main
mainwindow.main()
File "C:\Users\marco\anaconda3\envs\Webscraping_env\lib\site-packages\spyder\app\mainwindow.py", line 3700, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\marco\anaconda3\envs\Webscraping_env\lib\site-packages\spyder\app\mainwindow.py", line 3556, in run_spyder
main.setup()
File "C:\Users\marco\anaconda3\envs\Webscraping_env\lib\site-packages\spyder\app\mainwindow.py", line 1217, in setup
self.apply_shortcuts()
File "C:\Users\marco\anaconda3\envs\Webscraping_env\lib\site-packages\spyder\app\mainwindow.py", line 3207, in apply_shortcuts
self.help.show_intro_message()
File "C:\Users\marco\anaconda3\envs\Webscraping_env\lib\site-packages\spyder\plugins\help\plugin.py", line 456, in show_intro_message
shortcut_editor, "\n\n", prefs)
TypeError: not enough arguments for format string
But when I go to the root environment and try to launch from there Spyder version 4.0.1, it launchs with no issues.
all,
I've installed the package:pywinauto successfully with "pip install pywinauto", but it always fails, why?
I did it in this way:
pip install pywinauto
and then under the windows cmd env, I run the python:
and then:
import pywinauto
I got the following errors:
....
>>> import pywinauto
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\pywinauto\__init__.py", line 40, in <module>
from . import findwindows
File "C:\Python27\lib\site-packages\pywinauto\findwindows.py", line 42, in <module>
from . import controls
File "C:\Python27\lib\site-packages\pywinauto\controls\__init__.py", line 36,in <module>
from . import uiawrapper # register "uia" back-end (at the end of uiawrapper module)
File "C:\Python27\lib\site-packages\pywinauto\controls\uiawrapper.py", line 44, in <module>
from ..uia_defines import IUIA
File "C:\Python27\lib\site-packages\pywinauto\uia_defines.py", line 175, in <module>
pattern_ids = _build_pattern_ids_dic()
File "C:\Python27\lib\site-packages\pywinauto\uia_defines.py", line 163, in _build_pattern_ids_dic
if hasattr(IUIA().ui_automation_client, cls_name):
File "C:\Python27\lib\site-packages\pywinauto\uia_defines.py", line 50, in __call__
cls._instances[cls] = super(_Singleton, cls).__call__(*args, **kwargs)
File "C:\Python27\lib\site-packages\pywinauto\uia_defines.py", line 60, in __init__
self.UIA_dll = comtypes.client.GetModule('UIAutomationCore.dll')
File "C:\Python27\lib\site-packages\comtypes\client\_generate.py", line 97, in GetModule
tlib = comtypes.typeinfo.LoadTypeLibEx(tlib)
File "C:\Python27\lib\site-packages\comtypes\typeinfo.py", line 485, in LoadTypeLibEx
_oleaut32.LoadTypeLibEx(c_wchar_p(szFile), regkind, byref(ptl))
File "_ctypes/callproc.c", line 950, in GetResult
WindowsError: [Error -2147312566] Error loading type library/DLL
It looks like you're using old OS Windows version like Windows XP. MS UI Automation is included into Windows Vista and later. But you may install .NET Framework 3.0+ to get UIAutomationCore.dll available even on Windows XP. If you don't need MS UI Automation technology at all, just run pip uninstall comtypes and pywinauto will work with Win32 API only.
If installing .NET Framework 3.0+ doesn't help (or if it's already installed) and you need to use Win XP, install Windows update KB971513. It solved the loading library issue for me.
I need upgrade the Winxp to Win7 or Win8, or Win10.
I have installed robotframework-ride on two PCs of mine. Everything works fine on one PC but could not have RIDE running on other PC.
I have the following installed on both PCs
- Python 2.7.8 on win32
- Robot framework 2.8.6
- wxPython 2.8.12.1
- robotframeowkr-ride-1.4.1b
When I tried to execute "python ride.py" on the second PC, I got a message:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\robotide__init__.py", line 74, in main
run(inpath, not noupdatecheck, debug_console)
File "C:\Python27\lib\site-packages\robotide__init_.py", line 100, in run
ride = RIDE(inpath, updatecheck)
File "C:\Python27\lib\site-packages\robotide\application\application.py", line
41, in __init_
wx.App.init(self, redirect=False)
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx_core.py", line 7981
, in init
self.BootstrapApp()
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx_core.py", line 7555
, in _BootstrapApp
return _core.PyApp__BootstrapApp(args, *kwargs)
File "C:\Python27\lib\site-packages\robotide\application\application.py", line
49, in OnInit
self.namespace = Namespace(self.settings)
File "C:\Python27\lib\site-packages\robotide\namespace\namespace.py", line 41,
in init
self._set_pythonpath()
File "C:\Python27\lib\site-packages\robotide\namespace\namespace.py", line 62,
in _set_pythonpath
self._settings.get('installed robot version', None))
File "C:\Python27\lib\site-packages\robotide\namespace\robotlibraryloader.py",
line 35, in find_installed_robot_libraries
rf_file, rf_version = output.strip().split(', ')
ValueError: too many values to unpack
Use --help to get usage information.
Something more interesting is, if I uninstall robot framework from the second PC, I could execute "python ride.py" but of course there is no point doing this.
Anyone can help me out here?
With kind assistance from janne, I have solved this problem. The cause is for the first PC I installed the correct "robotframework", but for the second PC I managed to install a wrong module, "robot" instead of "robotframework". That was why RIDE was not working.
I am sorry for making such a silly mistake. A big thank you to janne for his help.
should use: pip install robotframework
should NOT use: pip install robot
I am new to Python and also Google App Engine, but I am stuck up with the installations of it and its compatibility. I am using mac os -x and eclipse helios and got the pyDev plugin installed but in spite of all this i am still getting errors. . .
Whenever I try to import PIL from the terminal it does not give me any errors meaning that it was installed successfully but when I use the same Import in the eclipse file. I getting the compilation error as:
"Unresolved Import"
Please help me with this
Somehow I tried to fix that, then it gives me the error saying that imaging : no matching architecture in universal wrapper
when I changed the architecture to 32 bit ti gives me this in Eclipse Log :
Traceback (most recent call last):
File "/Users/Vinay/Documents/EclispeHeliosWorkspace/helloworld/Main.py", line 7, in <module>
im.show()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/Image.py", line 1483, in show
_show(self, title=title, command=command)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/Image.py", line 2123, in _show
apply(_showxv, (image,), options)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/Image.py", line 2127, in _showxv
apply(ImageShow.show, (image, title), options)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/ImageShow.py", line 41, in show
if viewer.show(image, title=title, **options):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/ImageShow.py", line 66, in show
self.show_image(image, **options)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/ImageShow.py", line 85, in show_image
return self.show_file(self.save_image(image), **options)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/ImageShow.py", line 81, in save_image
return image._dump(format=self.get_format(image))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/Image.py", line 488, in _dump
self.load()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/ImageFile.py", line 164, in load
self.load_prepare()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/ImageFile.py", line 231, in load_prepare
self.im = Image.core.new(self.mode, self.size)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL/Image.py", line 37, in __getattr__
raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed
What do I do :( ?
PIL has some specific instructions for installation. Have you seen them?
Installing PIL on GAE
Download the PIL .dmg file. For example, you can download the PIL 1.1.6 .dmg file from http://pythonmac.org/packages/py25-fat/index.html.
Double-click on the installer to start the installation process.
Choose the correct directory. Finish the installation.
This is just for use in your local development environment. When you upload it'll use a GAE supplied version of PIL which means you also have to update your app.yaml file like so:
libraries:
- name: PIL
version: "1.1.7"
as detailed here.
IIRC You will want to install it "inside" your application directory itself so it can be accessed by your application locally. Not sure about that on the MAC however.
I just installed Pillow (using: sudo pip install Pillow) to get PIL in Python 2.7.6 on OS X 10.8.5 Mountain Lion.
I had the same issue in PyDev with Eclipse Kepler. To fix:
Go to:
Eclipse -> Preferences -> PyDev -> Interpreter - Python -> Libraries and click on "New Folder."
Then navigate to:
/Library/Python/2.7/site-packages
and click Open, and then Apply, then OK.
Then I quit Eclipse and restarted -- problem fixed. :)