Skip to content

UnicodeDecodeError: ASCII code can't decode byte... #1830

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

Closed
riccardorighettiphoto opened this issue Apr 11, 2018 · 2 comments · May be fixed by IdanDavidi/InstaPy#1
Closed

UnicodeDecodeError: ASCII code can't decode byte... #1830

riccardorighettiphoto opened this issue Apr 11, 2018 · 2 comments · May be fixed by IdanDavidi/InstaPy#1

Comments

@riccardorighettiphoto
Copy link

riccardorighettiphoto commented Apr 11, 2018

Continuously getting this error. Any idea?
CentOS 7.x, Python 2.7

Traceback (most recent call last): File "./quickstart.py", line 39, in <module> session.like_by_tags(['tag1', 'tag2', 'tag3', 'tag4'], amount=100) File "/home/my_name/InstaPy/instapy/instapy.py", line 987, in like_by_tags '--> Image not liked: {}'.format(reason.encode('utf-8'))) UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 49: ordinal not in range(128)

@axlright
Copy link

axlright commented Jun 21, 2018

I just got this same error. Seems to have barfed out on an emoji in an image description.

https://www.instagram.com/p/BkRhLVbFgWF/

Traceback (most recent call last):
  File "user-xxx-hashtag-architecturelovers.py", line 63, in <module>
    session.like_by_tags(['#architecturelovers'], amount=636)
  File "/Users/my_name/Documents/Code/InstaPy/instapy/instapy.py", line 1315, in like_by_tags
    '--> Image not liked: {}'.format(reason.encode('utf-8')))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 53: ordinal not in range(128)

@timgrossmann
Copy link
Collaborator

The issue is bound to your terminal output and the standard decoding that is set (seems like Ascii).
If you change the decoding, it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants