-
Notifications
You must be signed in to change notification settings - Fork 47
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
UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2: illegal multibyte sequence #9
Comments
I believe this issues is the same that I'm seeing... geotext\read_table has an input encoding but this is never used during the file At Line 45:
Should be:
|
Worked like a charm, Thank you so much... |
Unfortunately this doesn't solve all issues related to this, but it works in a pinch... |
elyase
pushed a commit
that referenced
this issue
Jun 13, 2018
Should be fixed in master:
thanks for reporting and thanks to @DevinCharles for the help. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from geotext import GeoText
places = GeoText("London is a great city")
places.cities
GeoText('New York, Texas, and also China').country_mentions
My computer system is Windows 10... The code fragment is mentioned above. Then it throws an error:
"D:\Program Files\Python3\python.exe" D:/OneDrive/Programs/Jieba/ExtractLocation.py
Traceback (most recent call last):
File "D:/OneDrive/Programs/Jieba/ExtractLocation.py", line 20, in
from geotext import GeoText
File "C:\Users\Du Fei\AppData\Roaming\Python\Python36\site-packages\geotext_init_.py", line 7, in
from .geotext import GeoText
File "C:\Users\Du Fei\AppData\Roaming\Python\Python36\site-packages\geotext\geotext.py", line 87, in
class GeoText(object):
File "C:\Users\Du Fei\AppData\Roaming\Python\Python36\site-packages\geotext\geotext.py", line 103, in GeoText
index = build_index()
File "C:\Users\Du Fei\AppData\Roaming\Python\Python36\site-packages\geotext\geotext.py", line 74, in build_index
get_data_path('countryInfo.txt'), usecols=[4, 0], skip=1)
File "C:\Users\Du Fei\AppData\Roaming\Python\Python36\site-packages\geotext\geotext.py", line 48, in read_table
next(f)
UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2: illegal multibyte sequence
The text was updated successfully, but these errors were encountered: