Skip to content
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

Error when trying to change to non-ascii directories in the Working Directory toolbar #4816

Closed
scilence1212 opened this issue Jul 26, 2017 · 1 comment

Comments

@scilence1212
Copy link

Description

What steps will reproduce the problem?

What is the expected output? What do you see instead?

Please provide any additional information below

File "C:\Users\len\Anaconda2\lib\site-packages\spyder\plugins\ipythonconsole.py", line 895, in set_working_directory
refresh_console=False)
File "C:\Users\len\Anaconda2\lib\site-packages\spyder\plugins\workingdirectory.py", line 286, in chdir
os.chdir( to_text_string(directory) )
WindowsError: [Error 3] : u'D:\\u0376\ufffd\ufffd\\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd'

Version and main components

  • Spyder Version: 3.2.0
  • Python Version: 2.7.13
  • Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies

pyflakes >=0.5.0  :  1.5.0 (OK)
pycodestyle >=2.3 :  2.3.1 (OK)
pygments >=2.0    :  2.2.0 (OK)
pandas >=0.13.1   :  0.20.1 (OK)
numpy >=1.7       :  1.12.1 (OK)
sphinx >=0.6.6    :  1.6.3 (OK)
rope >=0.9.4      :  0.10.5 (OK)
jedi >=0.9.0      :  0.10.2 (OK)
nbconvert >=4.0   :  5.2.1 (OK)
sympy >=0.7.3     :  1.0 (OK)
cython >=0.21     :  0.25.2 (OK)
qtconsole >=4.2.0 :  4.3.0 (OK)
IPython >=4.0;<6.0:  5.3.0 (OK)
pylint >=0.25     :  1.7.2 (OK)

@ccordoba12
Copy link
Member

Sorry for this error. We'll fix it in version 3.2.1.

@rlaverde, the fix is quite simple. Instead of using to_text_string in line 286 of plugins/workingdirectory.py, we need to use encoding.to_unicode_from_fs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants