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

builtins.UnicodeEncodeError #12

Open
WurstCommander opened this issue Jul 22, 2016 · 4 comments
Open

builtins.UnicodeEncodeError #12

WurstCommander opened this issue Jul 22, 2016 · 4 comments

Comments

@WurstCommander
Copy link

After starting the app and going to localhost:5000

I get the following error:

builtins.UnicodeEncodeError

UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f512' in position 91: character maps to

Traceback (most recent call last)
File "C:\python30\lib\site-packages\flask\app.py", line 2000, in call
return self.wsgi_app(environ, start_response)
File "C:\python30\lib\site-packages\flask\app.py", line 1991, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "C:\python30\lib\site-packages\flask\app.py", line 1567, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\python30\lib\site-packages\flask_compat.py", line 33, in reraise
raise value
File "C:\python30\lib\site-packages\flask\app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "C:\python30\lib\site-packages\flask\app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\python30\lib\site-packages\flask\app.py", line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\python30\lib\site-packages\flask_compat.py", line 33, in reraise
raise value
File "C:\python30\lib\site-packages\flask\app.py", line 1639, in full_dispatch_request
rv = self.dispatch_request()
File "C:\python30\lib\site-packages\flask\app.py", line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File "D:\0815_Spielwiese\tinder-detective-master\app.py", line 13, in index
profiles = stalker.get_profiles()
File "D:\0815_Spielwiese\tinder-detective-master\api.py", line 142, in get_profiles
friends = self.get_facebook_friends_tinder_ids()
File "D:\0815_Spielwiese\tinder-detective-master\api.py", line 85, in get_facebook_friends_tinder_ids
be_creepy = input("Sure you want to look at your Facebook friends' Tinder profiles? They might not like that. 🔒 [y/n]: ").lower() in ("y", "yes")
File "C:\python30\lib\encodings\cp850.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f512' in position 91: character maps to

@esquire900
Copy link

In windows cli, run "chcp 65001"

@hrosdei
Copy link

hrosdei commented Jul 24, 2016

I have the same issue. Were you able to resolve the problem @WurstCommander?

@WurstCommander
Copy link
Author

WurstCommander commented Jul 25, 2016

chcp 65001 before executing the app solved it.

but I opend the *.py files in pycharm and saved, maybe it changed the encoding too?

@ghost
Copy link

ghost commented Jan 15, 2017

advice from an utter n00b:
Issue from what I can tell are the emojis used throughout api.py - I just replaced those with plaintext and it started playing nicely again.

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