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

Default encoding change #1239

Open
zzasdf opened this issue Dec 17, 2023 · 3 comments
Open

Default encoding change #1239

zzasdf opened this issue Dec 17, 2023 · 3 comments

Comments

@zzasdf
Copy link

zzasdf commented Dec 17, 2023

I encountered a change in the default encoding of Python when using lhotse to extract fbank features. Originally, the default encoding of python is "UTF-8", but after calling the function compute_features, it becomes ANSI_ X3.4-1968, which causes an error in saving non English files. This situation happen when I run the code at the first time in a docker container, and won't happen when I run the code again. What could be the reason for this?
55a6826232fae95f0a624d34d124aac

@zzasdf
Copy link
Author

zzasdf commented Dec 17, 2023

Setting the environment variable PYTHONUTF8=1 can fix this problem

@pzelasko
Copy link
Collaborator

That's surprising, I don't think there's any code in lhotse itself that would change the encoding. If the env var works for you that sounds good.

@AkagawaTsurunaki
Copy link

Thanks a lot. Otherwise, I thought I had to edit the source code.
But the change of encoding should be added into the notes of the doc to avoid confusion.

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