[Github-comments] [geany/geany-plugins] [debugger] Strange issue when python .pth files have non ASCII bytes (Issue #1143)

panda967 notifications at xxxxx
Thu Dec 2 13:16:57 UTC 2021


Hi. I am working on Ubuntu 18.04. Geany and geany-plugins 1.38 compiled from sources.
I experienced that, if in the file:

- ~/.local/lib/python3.6/site-packages/altre-cartelle.pth

there is any non strictly ASCII byte, the debugger will not start when the Run button is clicked. Executing geany from the console, I can read the output:

Failed to import the site module
Traceback (most recent call last):
  File "/usr/lib/python3.6/site.py", line 570, in <module>
    main()
  File "/usr/lib/python3.6/site.py", line 556, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python3.6/site.py", line 291, in addusersitepackages
    addsitedir(user_site, known_paths)
  File "/usr/lib/python3.6/site.py", line 213, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/usr/lib/python3.6/site.py", line 169, in addpackage
    for n, line in enumerate(f):
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 66: ordinal not in range(128)

Removing the non ASCII bytes, the debugger runs without problems.
Ciao.
Massimo

My native language is not English, please excuse me any incorrectness, I apologize for any inconvenience caused, thank you

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/1143
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211202/9321daa6/attachment.htm>


More information about the Github-comments mailing list