geograpy模块的python代码给出了一些错误

时间:2019-06-19 12:39:49

标签: python-3.x

解决了nltk的一些错误,但是这些仍然存在

import geograpy
url = 'http://www.bbc.com/news/world-europe-26919928'
places = geograpy.get_place_context(url=url)

这是生成的错误

Traceback (most recent call last):
  File "C:\Users\Monika\Desktop\p.py", line 3, in <module>
    places = geograpy.get_place_context(url=url)
  File "C:\Users\Monika\AppData\Local\Programs\Python\Python37\lib\site-packages\geograpy\__init__.py", line 11, in get_place_context
    pc.set_cities()
  File "C:\Users\Monika\AppData\Local\Programs\Python\Python37\lib\site-packages\geograpy\places.py", line 137, in set_cities
    self.populate_db()
  File "C:\Users\Monika\AppData\Local\Programs\Python\Python37\lib\site-packages\geograpy\places.py", line 30, in populate_db
    for row in reader:
  File "C:\Users\Monika\AppData\Local\Programs\Python\Python37\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 274: character maps to <undefined>

0 个答案:

没有答案