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

[Find File Errors] decode error #3

Open
DogmaDragon opened this issue Jun 27, 2024 · 2 comments
Open

[Find File Errors] decode error #3

DogmaDragon opened this issue Jun 27, 2024 · 2 comments

Comments

@DogmaDragon
Copy link

Happens when trying to run any of the tasks. But it did work on an empty log file, so I suspect there is a character in some filename that the code dislikes.

time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors] Traceback (most recent call last):"
time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors]   File \"C:\\Users\\redacted\\.stash\\plugins\\stg-annon\\findFileErrors/main.py\", line 122, in <module>"
time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors]     main()"
time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors]   File \"C:\\Users\\redacted\\.stash\\plugins\\stg-annon\\findFileErrors/main.py\", line 25, in main"
time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors]     find_scan_errors()"
time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors]   File \"C:\\Users\\redacted\\.stash\\plugins\\stg-annon\\findFileErrors/main.py\", line 45, in find_scan_errors"
time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors]     for line in log_file:"
time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors]   File \"C:\\Python312\\Lib\\encodings\\cp1252.py\", line 23, in decode"
time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors]     return codecs.charmap_decode(input,self.errors,decoding_table)[0]"
time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
time="2024-06-27 23:28:50" level=error msg="[Plugin / Find File Errors] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 2817: character maps to <undefined>"
time="2024-06-27 23:28:50" level=debug msg="Plugin Find File Errors finished"
time="2024-06-27 23:28:50" level=error msg="Plugin returned error: exit status 1"

Stash version: stashapp/stash@a8fca47
Plugin version: 0.2-07f89ce

@stg-annon
Copy link
Owner

It seems the logfile encoding might not match your systems default encoding, I would assume its utf-8 based on the error so ill probably default to that for the plugin

just pushed some changes if you want to try it out

@DogmaDragon
Copy link
Author

DogmaDragon commented Jun 28, 2024

It still didn't work even after c2cca9b.

I narrowed down the issue to emojis in filenames. I had a few filenames with 💦 and similar. Removing those lines from the log fixed it.

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