我正在尝试使用Python Wikipedia-api。我收到如下错误。
File "C:\Python37\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
我没有找到解决此错误的方法。
import wikipedia
page = wikipedia.page("google")#interpreter shows error for this line
print(page.summary)
我希望输出如下:
https://en.wikipedia.org/wiki/Google
答案 0 :(得分:0)
如果您所在国家/地区的维基百科访问受到限制,则会导致错误。
您可以在计算机上使用vpn解决错误。