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

Ignore encoding errors when opening scb files #1

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

dfeeley
Copy link
Contributor

@dfeeley dfeeley commented Jul 1, 2021

Hi, thanks for creating this, its been very useful.

This pull request handles a case I encountered with windows-1252 encoded swimmer names in the .scb files causing the process to fail. Since we don't actually care about the swimmer names we can just ignore encoding errors when opening the scb file.

@JohnStrunk
Copy link
Owner

Thanks for the patch!
Could you send me an example scb that has the problem? I've been working on https://github.com/JohnStrunk/wahoo-results which has the same scb->dolphin functionality, and I'd like to have a test case that I can add to the parser.

@JohnStrunk JohnStrunk merged commit 3d96d4f into JohnStrunk:master Jul 1, 2021
@JohnStrunk
Copy link
Owner

@dfeeley What OS are you using?

After testing out that example file and digging around a bit, I think this is a platform-specific issue.
On Windows (or my machine, anyway), the default encoding is cp1252 based on the output of locale.getpreferredencoding(False). I've updated wahoo-results to always specify 1252 even though it's not going to run anywhere but Windows.

My thought is that the fix for this issue should be encoding="cp1252" instead of utf-8. If you get a chance, could you give it a try?

@dfeeley
Copy link
Contributor Author

dfeeley commented Jul 3, 2021 via email

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

Successfully merging this pull request may close these issues.

None yet

2 participants