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

UnicodeDecodeError with reactpy.web.export #1175

Closed
Archmonger opened this issue Dec 20, 2023 Discussed in #1173 · 0 comments · Fixed by #1200
Closed

UnicodeDecodeError with reactpy.web.export #1175

Archmonger opened this issue Dec 20, 2023 Discussed in #1173 · 0 comments · Fixed by #1200
Labels
priority-1-high Should be resolved ASAP. type-bug About something that isn't working

Comments

@Archmonger
Copy link
Contributor

Discussed in #1173

Originally posted by stevej2608 December 19, 2023
I'm developing a custom JS component. When I test the component it works fine on Linux but when I test on Windows I get UnicodeDecodeError: 'charmap' codec can't decode byte'.., It happens when the bundle is being loaded.

The problem is that fixed by adding utf-8 encoding to loader.

./reactpy/web/utils.py#L31

    export_names, references = resolve_module_exports_from_source(
        file.read_text(encoding="utf-8"), exclude_default=is_re_export
    )
@Archmonger Archmonger added the type-bug About something that isn't working label Dec 20, 2023
@Archmonger Archmonger changed the title UnicodeDecodeError with module_from_template UnicodeDecodeError with reactpy.web.export Feb 23, 2024
@Archmonger Archmonger added the priority-1-high Should be resolved ASAP. label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-1-high Should be resolved ASAP. type-bug About something that isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant