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

'charmap' codec can't encode character '\u2502' #1

Open
skorotkiewicz opened this issue Nov 21, 2017 · 1 comment
Open

'charmap' codec can't encode character '\u2502' #1

skorotkiewicz opened this issue Nov 21, 2017 · 1 comment

Comments

@skorotkiewicz
Copy link

Traceback (most recent call last): File "rnn_train.py", line 148, in <module> txt.print_learning_learned_comparison(x, y, l, bookranges, bl, acc, epoch_size, step, epoch) File "C:\Users\sebas\tensorflow-shakespeare-poem-generator\my_txtutils.py", line 159, in print_learning_learned_comparison print(print_string.format(decx, decy, loss_string)) File "E:\Programy\Miniconda\envs\tensorflow-python\lib\encodings\cp1250.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u2502' in position 44: character maps to <undefined>

@jameshulse
Copy link

Are you running the training on a remote machine (ssh)?

I had a similar issue. It worked fine locally but I uploaded the solution to a beefy AWS box and ran in to unicode issues.

To fix the issue I had to comment out the line in my global SSH config which forwards your locale settings from your local machine.

The file is: /etc/ssh/ssh_config and you need to add a # to the start of the SendEnv line like so:

Host *
#       SendEnv LANG LC_*

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

2 participants