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

Unicode Encode Error #4

Open
frankai opened this issue Sep 3, 2019 · 4 comments
Open

Unicode Encode Error #4

frankai opened this issue Sep 3, 2019 · 4 comments

Comments

@frankai
Copy link

frankai commented Sep 3, 2019

Hi! thanks for this useful tool.

Trying to use it the tool (macOS Catalina, strings file) it returns this error, any clue to fix it?

Thanks in advance!
Franky


original:"Miscellaneous Arrows" = "Flechas Varios";
translated:"Miscellaneous Arrows" ="Várias setas";

Traceback (most recent call last):
File "/usr/local/bin/translate", line 33, in
main()
File "/usr/local/bin/translate", line 29, in main
mkTranslator().translate_doc(filepath=args.file_path, destination=args.dest_language,sourcelanguage=args.sourcelanguage,channel=args.channel)
File "/Library/Python/2.7/site-packages/mkTranslation/translator.py", line 165, in translate_doc
self.write_tx(filepath,newFile,r"=\s*"(.+?)"\s*;",'="'+'content'+'";',destination,sourcelanguage,channel)
File "/Library/Python/2.7/site-packages/mkTranslation/translator.py", line 116, in write_tx
f.write(txd)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 169: ordinal not in range(128)

@frankai
Copy link
Author

frankai commented Sep 3, 2019

Just in case, I was trying to translate from EN to PT using Google Translate.

@ProfessorVarox
Copy link

did you use pip install mkTranslation ?
Then use pip3 install mkTranslation that worked for me

@macluky
Copy link

macluky commented Sep 1, 2020

I can confirm that works
note that catelina defaults to pyhton2.7 so be aware which one you pick

@aydinozkan
Copy link

You may need sudo -H pip3 install mkTranslation

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

4 participants