#πŸ”’ Problem with charmap encoding

27 messages Β· Page 1 of 1 (latest)

ivory bronze
#

so i've updated tensorflow last night and started running into some issues. Regardless I tried to start over completely and even then i'm still running into some form of problem. Any help would be appreciated, the 2 lines of code and the errors are attached.

craggy schoonerBOT
#

@ivory bronze

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

shadow magnet
#

are you using open()?

ivory bronze
#

as in to open a file?

#

no

#

that one singular line of code is genuinely the only thing i'm running

#

ran into the same issue trying to fit some training data into a neural network

shadow magnet
#

your stdout is probably set to use ascii

ivory bronze
#

and how would I go about changing that?

shadow magnet
#

Do you know how to set environment variables?

#

PYTHONIOENCODING=utf-8

#

or in python: ```py
import sys

sys.stdout.reconfigure(encoding='utf-8')

ivory bronze
#

tried it

#

same issue unfortunately

#

its so weird i've genuinely never seen this in my life

shadow magnet
#

Before or after you used keras?

ivory bronze
#

like two seconds ago

shadow magnet
#

in the code

ivory bronze
#

yeah

shadow magnet
#

show the code

ivory bronze
#

I can check the env. variables but

shadow magnet
#

you need to set it before launching python

ivory bronze
#

ah yeah you're right I probably should've thought of closing and reopening it

#

my bad, works now

#

appreciate it

craggy schoonerBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.