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

make_srpm cannot decode text #3645

Closed
huakim opened this issue Feb 25, 2025 · 3 comments · Fixed by #3646
Closed

make_srpm cannot decode text #3645

huakim opened this issue Feb 25, 2025 · 3 comments · Fixed by #3646

Comments

@huakim
Copy link

huakim commented Feb 25, 2025

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 61257: invalid start byte
https://download.copr.fedorainfracloud.org/results/huakim/kde-plasma/srpm-builds/08697920/builder-live.log.gz

@huakim
Copy link
Author

huakim commented Feb 25, 2025

maybe, we should add errors='ignore' option?
for example, stdout=stdout.decode('utf-8').strip() should be stdout=stdout.decode('utf-8',errors='ignore').strip()

@nikromen
Copy link
Member

nikromen commented Feb 25, 2025

huh, that's some weird encoding in that file :D

stdout=stdout.decode('utf-8', errors='ignore').strip()

yes probably, but then it'd be just in bytes?

@FrostyX
Copy link
Member

FrostyX commented Feb 25, 2025

Thank you for the report @huakim.
You probably noticed but for the record, the issue was fixed by coprmatrix/cpanspec@1056cfa and the package builds now.

But I like the suggestion with stdout.decode('utf-8',errors='ignore'), let me file a PR. I already tested it and it works.

FrostyX added a commit to FrostyX/copr that referenced this issue Feb 25, 2025
FrostyX added a commit to FrostyX/copr that referenced this issue Feb 25, 2025
Fix fedora-copr#3645

This doesn't ignore the whole (lines of) output. Only the broken characters. In
this particular example, there was a problem with the special "u" character in
Tina Müller and the output resulted to Tina Mller and Tina M\xfcller. That is
much better than failing completely.
github-actions bot pushed a commit that referenced this issue Feb 25, 2025
Fix #3645

This doesn't ignore the whole (lines of) output. Only the broken characters. In
this particular example, there was a problem with the special "u" character in
Tina Müller and the output resulted to Tina Mller and Tina M\xfcller. That is
much better than failing completely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs triage
Development

Successfully merging a pull request may close this issue.

3 participants