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

binary file should be open with 'rb' instead of 'r' in advanced exemple #99

Closed
pidou46 opened this issue Nov 3, 2024 · 4 comments
Closed

Comments

@pidou46
Copy link
Contributor

pidou46 commented Nov 3, 2024

With mp 1.24 , in advanced usage exemple: <with open('test.ulp', 'r') as f:> rise a unicode exception

It should be changed to:
<with open('test.ulp', 'rb') as f:>

@ThomasWaldmann
Copy link
Collaborator

guess this refers to item 3 there: https://github.com/micropython/micropython-esp32-ulp/blob/master/docs/index.rst#advanced-usage

sure, reading binary files should always use "rb" mode.

can you submit a PR?

@pidou46
Copy link
Contributor Author

pidou46 commented Nov 3, 2024 via email

@ThomasWaldmann
Copy link
Collaborator

I don't think you need to check with old micropython versions, just with the current one.

@wnienhaus
Copy link
Collaborator

Fixed by #100

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

3 participants