我正在尝试在 spyder 中运行代码并引发错误
" return self.do_open(http.client.HTTPConnection, req)
File "C:\Users\name\AppData\Local\Continuum\Anaconda3-5.2.0\lib\urllib\request.py", line 1320, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 11001] getaddrinfo failed>"
same code works fine in jupyter notebook.
代码如下
import overpy
import pandas as pd
import time
import os
root = r'C:/Users/(name)/Documents/abc'
fstem = 'sample'
fname = fstem+'.csv'
df = pd.read_csv(os.path.join(root,fname))
#df.sort_values(by=['cvdt35_timestamp_s'],inplace=True)
print('# of records = '+str(len(df)))
api= overpy.Overpass()
郎朗坤
相关分类