-
-
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
Couple of tracebacks when launching Spyder 6.0.0a4 for the first time #21856
Comments
Thanks @dalthviz. I'll take care of this one. |
@impact27, how do you think we should handle this error? Traceback (most recent call last):
File "C:\Users\dalth\anaconda3\envs\spyder6_test\Lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 898, in update_path
self.get_widget().update_path(path_dict, new_path_dict)
File "C:\Users\dalth\anaconda3\envs\spyder6_test\Lib\site-packages\spyder\plugins\ipythonconsole\widgets\main_widget.py", line 2206, in update_path
shell.update_syspath(path_dict, new_path_dict)
File "C:\Users\dalth\anaconda3\envs\spyder6_test\Lib\site-packages\spyder\plugins\ipythonconsole\widgets\shell.py", line 685, in update_syspath
self.call_kernel(
File "C:\Users\dalth\anaconda3\envs\spyder6_test\Lib\site-packages\spyder\plugins\ipythonconsole\widgets\shell.py", line 349, in call_kernel
return self.kernel_handler.kernel_comm.remote_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'kernel_comm' It seems the kernel takes too much time to start, so Of course we could catch that exception and pass. But then all those calls to |
I didn't check the specifics, but in general the initial kernel setup is done in |
the |
What is strange is that both the |
I think that can happen when there's an error starting the kernel: spyder/spyder/plugins/ipythonconsole/widgets/main_widget.py Lines 1498 to 1506 in ad17193
In that case |
The sys.path is set in two ways: by setting the "SPY_PYTHONPATH" environment variable and by calling update_path. the first way is problematic because in case of a restart after changing the python path the old python path is restored. The second way is problematic because by calling remote_call directly without checking for the kernel state you can end up with the error in this issue. |
In fact this is true of most of the config that is set by an environment variable, I will change these as well. |
Issue Report Checklist
Problem Description
Installed Spyder 6.0.0a4 in a new env and in the first launch I got a couple of tracebacks printed in the Anaconda prompt instance from where I launched Spyder. Also, I think I had a custom interpreter selected which didn't comply with the minimum
spyder-kernels
version required for Spyder 6.0.0a4What steps reproduce the problem?
What is the expected output? What do you see instead?
No tracebacks when launching Spyder. Couple of tracebacks are shown over the Anaconda prompt instance used to launch Spyder
Paste Traceback/Error Below (if applicable)
Versions
Dependencies
The text was updated successfully, but these errors were encountered: