Not able to launch Spyder version 4.1.1 - python

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.

Related

Why do I have a problem with open Spyder 4.2.4

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?

Spyder keeps crashing during load in all Anaconda environment

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

spyder launch error: self.curr_filenames.pop(index) pop index out of range

my spyder won't launch and shows the following err: (
I just uninstalled old anaconda from windows remove programs, and reinstalled Anaconda3-2020.07-Windows-x86_64.exe.)
(base) C:\Users\XYZ>spyder
Traceback (most recent call last):
File "C:\Users\XYZ\Anaconda3\Scripts\spyder-script.py", line 10, in <module>
sys.exit(main())
File "C:\Users\XYZ\Anaconda3\lib\site-packages\spyder\app\start.py", line 219, in main
mainwindow.main()
File "C:\Users\XYZ\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3763, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\XYZ\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3638, in run_spyder
main.setup()
File "C:\Users\XYZ\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 984, in setup
plugin = module.PLUGIN_CLASS(self)
File "C:\Users\XYZ\Anaconda3\lib\site-packages\spyder\plugins\pylint\plugin.py", line 56, in __init__
self.pylint = PylintWidget(self, max_entries=max_entries,
File "C:\Users\XYZ\Anaconda3\lib\site-packages\spyder\plugins\pylint\widgets\pylintgui.py", line 252, in __init__
self.set_filename(f)
File "C:\Users\XYZ\Anaconda3\lib\site-packages\spyder\plugins\pylint\widgets\pylintgui.py", line 279, in set_filename
self.curr_filenames.pop(index)
IndexError: pop index out of range
[13520:380:0727/173051.399:ERROR:broker_win.cc(59)] Error reading broker pipe: The pipe has been ended. (0x6D)
[19460:22120:0727/173051.400:ERROR:broker_win.cc(59)] Error reading broker pipe: The pipe has been ended. (0x6D)
I've been stuck on this issue for the past 4 hours... Trying many uninstalls and installs, etc.
My fix was:
When in the Anaconda Prompt:
spyder --reset

Python gives error in anaconda after update

I have just tried to upgrade everything in my main environment to the latest version (using conda update --all). Everything went completely fine until I actually tried to run python. I got this error message:
Traceback (most recent call last):
File "C:\Users\Ayush\Anaconda3\lib\site.py", line 579, in <module>
main()
File "C:\Users\Ayush\Anaconda3\lib\site.py", line 562, in main
known_paths = venv(known_paths)
File "C:\Users\Ayush\Anaconda3\lib\site.py", line 494, in venv
addsitepackages(known_paths, [sys.prefix])
File "C:\Users\Ayush\Anaconda3\lib\site.py", line 349, in addsitepackages
addsitedir(sitedir, known_paths)
File "C:\Users\Ayush\Anaconda3\lib\site.py", line 207, in addsitedir
addpackage(sitedir, name, known_paths)
File "C:\Users\Ayush\Anaconda3\lib\site.py", line 159, in addpackage
f = open(fullname, "r")
File "C:\Users\Ayush\Anaconda3\lib\_bootlocale.py", line 12, in getpreferredencoding
if sys.flags.utf8_mode:
AttributeError: 'sys.flags' object has no attribute 'utf8_mode'
As you can see, it looks like a problem with sys.flags. I tried googling this, but I couldn't find anyone with the same issue. I am using python 3.6.7 (python didn't update itself). This error message also appears if I try to run python in the command prompt. Here is the output of running conda update --all. Hope you can help!
EDIT: I found an issue on this issue on github here, but this doesn't give any explanations on how to fix this.
NOTE: I have also tried to install a new version of python using the installer, but that didn't work either.
I somehow did it - I re-installed Python, and then I tried using the command prompt, and it worked. It turned out that if I deleted my idea folder in Pycharm, it would work with the new version!

Canopy is having difficulties updating packages, "AbortedOperationDetected"

I run Canopy version Version: 2.1.3.3542 (64 bit) on Windows 10.
Canopy cant manage to update any package, all results in the same
log output for a numpy update (for example):
Warming up...
Traceback (most recent call last):
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\package_action_worker.py", line 54, in run
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\package_action.py", line 196, in execute
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\packman.py", line 626, in <lambda>
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\packman.py", line 1051, in _install
File "build\bdist.win-amd64\egg\canopy_platform\cpython_packages_manager.py", line 152, in install_packages_prompt
File "build\bdist.win-amd64\egg\canopy_platform\cpython_packages_manager.py", line 137, in _install_packages_prompt
PackagesInstallationError: installation of packages ['numpy 1.11.3-3'] failed. Details below:
Traceback (most recent call last):
File "build\bdist.win-amd64\egg\canopy_platform\edm_api.py", line 64, in wrapper
File "build\bdist.win-amd64\egg\canopy_platform\edm_api.py", line 384, in install_command
File "build\bdist.win-amd64\egg\canopy_platform\edm_api.py", line 414, in _install_packages_command
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 124, in decorator
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 219, in install_command
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 223, in _install_command
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 549, in _compute_fix_aborted_actions
AbortedOperationDetected: Aborted operation detected in environment 'User'
There is absolutly 0 results on google for this error code, so stackexchange is my last resort
It looks like a previous update was force-aborted, possibly leaving the environment corrupted. Assuming that you are using the standard installer, then it should suffice to
reboot your computer
temporarily disable your anti-virus software if possible (or at least disable its more intrusive / slow functionality, such as online checking each of the tens of thousands of package files that Canopy provides),
from the Canopy Tools menu, select Troubleshoot => Reset Python environment

Categories

Resources