Circuitscape.py icon indicating copy to clipboard operation
Circuitscape.py copied to clipboard

Special characters in path cause error

Open bmcrae opened this issue 10 years ago • 1 comments

Special characters in can cause errors without an informative error message.

For example, one user had an accent mark in her output path (included the word 'Tânia'), and this produced the following error: File "PythonCard\widget.pyc", line 408, in _dispatch File "circuitscape\gui.pyc", line 443, in on_calc_Button_mouseClick File "circuitscape\cfg.pyc", line 164, in write File "ConfigParser.pyc", line 412, in write UnicodeEncodeError: "ascii" codec can't encode character u'\xe2' in position 20: ordinal not in range(128)

Having an error message that suggests a path without special characters would be helpful in cases like this.

bmcrae avatar Mar 06 '15 19:03 bmcrae

Python ConfigParser not able to handle unicode? Or may be there is some coercion of a unicode string to ascii happening somewhere.

tanmaykm avatar Mar 12 '15 14:03 tanmaykm