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

Trouble with utf-8 characters #404

Open
alexmeshr opened this issue Jan 27, 2025 · 0 comments
Open

Trouble with utf-8 characters #404

alexmeshr opened this issue Jan 27, 2025 · 0 comments

Comments

@alexmeshr
Copy link

alexmeshr commented Jan 27, 2025

It so happened that my pipeline contains utf-8 characters, and when I try to upload my pipeline into the main program, the pipelines module returns an error like this:

File "path_to_pipelines\pipelines\main.py", line 134, in load_module_from_path
    content = file.read()
              ^^^^^^^^^^^
  File "path_to_environment\Lib\encodings\cp1251.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 6628: character maps to <undefined>

Apparently, the error occurs at the stage of file analysis by the library; it cannot work with the utf-8 format.

The only crutch that has worked for me so far is to leave only the english pipeline code in the file, and move everything that involves other symbols to another file, which I import into the main file

sys.path.append("path_to_other_file")
from other_file import *

But this method is problematic when the main code is already running in a container.
Please, add utf-8 support
simple string

hello_variable = "Привет!"

Can ruin your entire pipeline.

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

1 participant