Instapy: How to Add a Korean Tag?

Created on 15 Nov 2017  路  5Comments  路  Source: timgrossmann/InstaPy

Expected Behavior

Using quickstart.py I tried inserting a Korean hashtag expecting it to run like it did with English tags.

Current Behavior

The error I get is: SyntaxError: Non-ASCII character

Possible Solution (optional)

I'm new to coding and I have a feeling I have to convert(?) or allow(?) the program to identify with Non-ASCII characters. Can anybody direct me to a source so as to learn how to do this?

InstaPy configuration

help wanted question wontfix

Most helpful comment

Just add these lines to quickstart.py and instapy.py:

# -*- coding: UTF-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')

All 5 comments

@kimelbert have you tried adding the tag in the form of u'koran_tag'?

Note the u before the string quotes here

@timgrossmann hey that didn't work. The way I made it work was to comment line 554 (instapy.py) so it doesn't delete white space. It's inefficient because I have to uncomment this line of code to change it to english, but it works. Thanks for commenting Tim. Really enjoy using instapy.

Just add these lines to quickstart.py and instapy.py:

# -*- coding: UTF-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')

Hi @hojjabr your solution doesn't work any more, do you have any other suggestion how to solve this issue?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. > If this problem still occurs, please open a new issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EvraCloak picture EvraCloak  路  60Comments

cormo1990 picture cormo1990  路  48Comments

CamiloB picture CamiloB  路  316Comments

ardagoktas picture ardagoktas  路  51Comments

drogon34 picture drogon34  路  73Comments