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

tail.py can crash when there is unicode in the log #163

Closed
mrob95 opened this issue Nov 22, 2020 · 3 comments
Closed

tail.py can crash when there is unicode in the log #163

mrob95 opened this issue Nov 22, 2020 · 3 comments

Comments

@mrob95
Copy link

mrob95 commented Nov 22, 2020

Symptom is that when I click "View Log" the lock screen flashes for a tiny second and then disappears.

This is the traceback:

==== Log: C:\Users\Mike\AppData\Roaming\talon\talon.log ====

Traceback (most recent call last):
  File "pdb.py", line 1704, in main
  File "pdb.py", line 1573, in _runscript
  File "bdb.py", line 580, in run
  File "<string>", line 1, in <module>
  File "c:\program files\talon\tail.py", line 66, in <module>
    tail(sys.argv[1])
  File "c:\program files\talon\tail.py", line 55, in tail
    for line in follow(path):
  File "c:\program files\talon\tail.py", line 16, in follow
    for line in f:
  File "encodings\cp1252.py", line 23, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 565: character maps to <undefined>
Uncaught exception. Entering post mortem debugging

The character that is causing the issue is this one - right quotation mark - https://www.compart.com/en/unicode/U+201D

Seems strange that it is using 1252 to decode rather than utf-8, but presumably a fairly simple fix

@lunixbochs
Copy link

Is this on the beta with python 3.8? For some reason -X UTF seems to have stopped working there.

@mrob95
Copy link
Author

mrob95 commented Nov 22, 2020

Latest beta I think - v0.1.2-105-g5b1386b (105)

@lunixbochs
Copy link

should be fixed in new beta

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

No branches or pull requests

2 participants