Spyder: UnicodeDecodeError when moving a file with Project Explorer

Created on 29 Oct 2017  路  7Comments  路  Source: spyder-ide/spyder

UnicodeDecodeError when moving an opened file with _Project Explorer_

Possibly due to old version?

What steps will reproduce the problem?

  1. Created a file chess.py and a folder tmp in the same folder
  2. Open chess.py in Spyder editor
  3. Move chess.py in tmp folder with the _Project Explorer_ bar

What is the expected output? What do you see instead?
Expected output: nothing, correctly moved file.

Effective output: the error trace (below).

Please provide any additional information below

File "%PYTHON%\lib\site-packages\spyder\widgets\explorer.py", line 710, in move
) % (basename, to_text_string(error)))
File "%PYTHON%\Python\lib\site-packages\spyder\py3compat.py", line 123, in to_text_string
return unicode(obj)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 49: ordinal not in range(128)

Version and main components

  • Spyder Version: 3.2.3
  • Python Version: 2.7.12
  • Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies

pyflakes >=0.5.0  :  1.3.0 (OK)
pycodestyle >=2.3 :  2.3.1 (OK)
pygments >=2.0    :  2.1.3 (OK)
pandas >=0.13.1   :  0.18.1 (OK)
numpy >=1.7       :  1.11.1 (OK)
sphinx >=0.6.6    :  1.4.6 (OK)
rope >=0.9.4      :  0.9.4 (OK)
jedi >=0.9.0      :  0.9.0 (OK)
nbconvert >=4.0   :  4.2.0 (OK)
sympy >=0.7.3     :  1.0 (OK)
cython >=0.21     :  0.24.1 (OK)
qtconsole >=4.2.0 :  4.2.1 (OK)
IPython >=4.0;<6.0:  5.1.0 (OK)
pylint >=0.25     :  1.5.4 (OK)

Python2 Projects Bug

All 7 comments

What's the full path to chess.py before moving? Does it contain any non-ASCII characters?

Note: Works the following configuration. (also with non-ASCII chars in the path to chess.py).

Version and main components

  • Spyder Version: 3.2.5.dev0 ed53e29
  • Python Version: 2.7.14
  • Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies

```
pyflakes >=0.5.0 : 1.6.0 (OK)
pycodestyle >=2.3 : 2.3.1 (OK)
pygments >=2.0 : 2.2.0 (OK)
pandas >=0.13.1 : None (NOK)
numpy >=1.7 : 1.13.3 (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.3.1 (OK)
sympy >=0.7.3 : None (NOK)
cython >=0.21 : None (NOK)
qtconsole >=4.2.0 : 4.3.1 (OK)
IPython >=4.0;<6.0: 5.4.1 (OK)
pylint >=0.25 : 1.7.4 (OK)

Try using python3, python2 could throw weird issues when working with unicode

@rlaverde my whole project is fully written in Python 2. I can not translate every single class to Python3....

@salvioner, what's the name of the folder you tried to move chess.py to?

I'm moving from
C:\Projects\PyBoardChess
to
C:\Projects\PyBoardChess\tmp

@ccordoba12 sry for late answer, i haven't logged in in a while

@dalthviz, please take a look at this one. If you're unable to reproduce it, add a test for it.

Was this page helpful?
0 / 5 - 0 ratings