python - Spyder changes working directory (wdir) when running a script -
when running script, spyder changes working directory (wdir) away set global working directory.
i migrated data new_user , spyder works fine except 1 script changes wdir old_user home directory when running code.
in [1]: runfile('/home/new_user/spyder/test.py', wdir='/home/old_user/spyder') i had checked:
- global working directory drop down menu on console
- python path manager
- preferences -> global working directory settings
- spyder run location
- script location
- that there no other old versions of spyder installed (i.e. on
other user may defaulting to)
the issue turned out run settings:
preferences -> run -> general settings -> default working directory
this still set old_user home directory, , not new user. don't know why didn't affect other scripts (or why still set old user) but, when changed new_user, worked fine , ran correct wdir.
Comments
Post a Comment