Open DavidHowlett opened 8 years ago
Screenshot of bug:
Thanks for the report. It appears one of our components is assuming a latin1 encoding instead of UTF-8, despite UTF-8 being the encoding you are using in the file.
Note to self: possibly related to #1541
This bug was marked as part of the 10.1 milestone but I am using Komodo IDE 10.1.2 and the bug is still present.
Hi, I cannot reproduce this. I copied your source file text and get the following expected error in the "Debug output" pane:
File "/path/to/support/dbgp/python3lib/dbgp/client.py", line 2445, in runMain
self.dbg.runfile(debug_args[0], debug_args)
File "/path/to/support/dbgp/python3lib/dbgp/client.py", line 2032, in runfile
h_execfile(file, args, module=main, tracer=self)
File "/path/to/support/dbgp/python3lib/dbgp/client.py", line 682, in __init__
exec(contents, globals, locals)
File "<string>", line 1
∞ = 'my string'
^
SyntaxError: invalid character in identifier
That is unexpected. Can you replicate the fault on windows? Possibly that is the cause of the difference. I have simplified the error further, hoping to get something that will replicate. Try: "1/0#∞"
Good point. When I have some time I will look into this on a Windows machine.
Short Summary
I am using python 3.5 in Komodo 10 on Windows. The issue is also present in Komodo 9. In python the expression float('∞') should produce a value error.
Steps to Reproduce
Run the following in a python file in Komodo:
float('∞')
Expected results
Traceback (most recent call last): File "", line 1, in
ValueError: could not convert string to float: '∞'
Actual results
Traceback (most recent call last): File "G:\reusable\junk.py", line 1, in
Error in sys.excepthook:
Traceback (most recent call last):
File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\support\dbgp\python3lib\dbgp\client.py", line 3961, in excepthook
_print_exception(type, value, tb)
File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\support\dbgp\python3lib\dbgp\client.py", line 389, in _print_exception
_print_tb(tb, limit, file)
File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\support\dbgp\python3lib\dbgp\client.py", line 366, in _print_tb
if line: file.write(' %s\n' % line.strip())
File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\support\dbgp\bin\py3_dbgp.py", line 129, in write
self._origStream.write(s)
File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\support\dbgp\bin\py3_dbgp.py", line 129, in write
self._origStream.write(s)
File "c:\anaconda3\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u221e' in position 11: character maps to
Original exception was: Traceback (most recent call last): File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\support\dbgp\bin\py3_dbgp.py", line 307, in
sys.exit( main(sys.argv) )
File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\support\dbgp\bin\py3_dbgp.py", line 281, in main
dbgp.client.runWithoutDebug(args, interactive, host, port, idekey, logLevel)
File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\support\dbgp\python3lib\dbgp\client.py", line 4023, in runWithoutDebug
h_execfile(debug_args[0], debug_args, module=main)
File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\support\dbgp\python3lib\dbgp\client.py", line 682, in init
exec(contents, globals, locals)
File "", line 1, in
ValueError:
Platform Information
I have seen the problem on: Windows 10 Python 3.5 Komodo IDE Version 9.3.2 Version 10.0.1
Additional Information
I discovered this while working on: http://bugs.python.org/issue27412