Can't open Tools/Current user environment variables
See original GitHub issueDescription
What steps will reproduce the problem?
In Spyder open Tools menu, then click Current user environment variables…
Doesnt open
Traceback
Traceback (most recent call last):
File "/home/mark/tutorial_env/lib64/python3.10/site-packages/spyder/plugins/application/container.py", line 252, in show_user_env_variables
self.dialog_manager.show(UserEnvDialog(self))
File "/home/mark/tutorial_env/lib64/python3.10/site-packages/spyder/utils/environ.py", line 162, in __init__
super().__init__(get_user_env(), parent, title, readonly)
File "/home/mark/tutorial_env/lib64/python3.10/site-packages/spyder/utils/environ.py", line 71, in get_user_env
env_dict = get_user_environment_variables()
File "/home/mark/tutorial_env/lib64/python3.10/site-packages/spyder/utils/environ.py", line 63, in get_user_environment_variables
k, v = kv.split('=', 1)
ValueError: not enough values to unpack (expected 2, got 1)
Versions
- Spyder version: 5.4.0 (pip)
- Python version: 3.10.8 64-bit
- Qt version: 5.15.2
- PyQt5 version: 5.15.7
- Operating System: Linux 6.0.5-200.fc36.x86_64
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.4.1 (OK)
chardet >=2.0.0 : 5.0.0 (OK)
cloudpickle >=0.5.0 : 2.2.0 (OK)
cookiecutter >=1.6.0 : 2.1.1 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.1.0 (OK)
IPython >=7.31.1;<8.0.0 : 7.34.0 (OK)
jedi >=0.17.2;<0.19.0 : 0.18.1 (OK)
jellyfish >=0.7 : 0.9.0 (OK)
jsonschema >=3.2.0 : 4.17.0 (OK)
keyring >=17.0.0 : 23.11.0 (OK)
nbconvert >=4.0 : 7.2.5 (OK)
numpydoc >=0.6.0 : 1.5.0 (OK)
parso >=0.7.0;<0.9.0 : 0.8.3 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.9.4 (OK)
pygments >=2.0 : 2.13.0 (OK)
pylint >=2.5.0;<3.0 : 2.15.6 (OK)
pylint_venv >=2.1.1 : 2.3.0 (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.6.0;<1.7.0 : 1.6.0 (OK)
pylsp_black >=1.2.0 : 1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0 : 3.0.3 (OK)
qstylizer >=0.2.2 : 0.2.2 (OK)
qtawesome >=1.2.1 : 1.2.1 (OK)
qtconsole >=5.4.0;<5.5.0 : 5.4.0 (OK)
qtpy >=2.1.0 : 2.3.0 (OK)
rtree >=0.9.7 : 1.0.1 (OK)
setuptools >=49.6.0 : 59.6.0 (OK)
sphinx >=0.6.6 : 5.3.0 (OK)
spyder_kernels >=2.4.0;<2.5.0 : 2.4.0 (OK)
textdistance >=4.2.0 : 4.5.0 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 2.1.9 (OK)
xdg >=0.26 : 0.28 (OK)
zmq >=22.1.0 : 24.0.1 (OK)
# Optional:
cython >=0.21 : None (NOK)
matplotlib >=3.0.0 : None (NOK)
numpy >=1.7 : None (NOK)
pandas >=1.1.1 : None (NOK)
scipy >=0.17.0 : None (NOK)
sympy >=0.7.3 : None (NOK)
Issue Analytics
- State:
- Created 10 months ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
can't modify user environment variables - Windows Client
To resolve this issue, modify the user environment variables by using the User Accounts item in Control Panel. You can follow these steps:...
Read more >How do I set system environment variables in Windows 10?
Go into Settings and click on System. ... Then on the left side click About and select System info at the bottom. ......
Read more >Problems with Environment Variables
Environment variable is not set. If the error message states that the environment variable is not set, IT MEANS PRECISELY THAT ! The...
Read more >Can the environment variables tool in windows be launched ...
Right click 'My Computer' and select 'Properties'. · Click 'Advanced System Settings' link. · Click 'Advanced' tab. · Click 'Environment Variables...' button.
Read more >How to Setup System Environment Variables in Windows?
Click on the “Advanced” tab and select “Environment Variables.” Windows 10 will now display the entire list of user and system variables stored...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue is being caused by an environment variable that has newline characters in its value. I’ll update the parsing to be more robust.
@markmcv, in your environment variables (listed from the
printenv
bash command) you have a variable that is actually a function,BASH_FUNC_which%%
. How is this defined in your bash startup scripts?