Skip to content

UnicodeDecodeError with reactpy.web.export #1175

Closed
@Archmonger

Description

@Archmonger

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
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions