when I use Basemap to visualize trajectory point based on arcgis REST API service, but there are always a urllib.error.HTTPError: HTTP Error 500: Internal Server Error, I do not know how to solve this problem, could someone give me some suggestions? code are followiing:
df = pd.read_csv('G:\\data\\vancouver.csv')
x = list(df['LON'])
y = list(df['LAT'])
plt.figure(figsize=(12, 9))
map = Basemap(llcrnrlon=-124.7,llcrnrlat=48.0,urcrnrlon=-122,urcrnrlat=50.5)
map.arcgisimage(service='NatGeo_World_Map', xpixels = 1500, ypixels=None,dpi=120, verbose= True)
lon, lat = map(x,y)
map.plot(lon, lat)
plt.show()
and the error is followed:
Traceback (most recent call last):
File "C:/Users/DELL/code/picture/地图可视化.py", line 18, in <module>
map.arcgisimage(service='NatGeo_World_Map', xpixels = 1500, ypixels=None,dpi=120, verbose= True)
File "F:\anaconda\lib\site-packages\mpl_toolkits\basemap\__init__.py", line 4296, in arcgisimage
img = Image.open(urlopen(basemap_url))
File "F:\anaconda\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "F:\anaconda\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "F:\anaconda\lib\urllib\request.py", line 640, in http_response
response = self.parent.error(
File "F:\anaconda\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "F:\anaconda\lib\urllib\request.py", line 502, in _call_chain
result = func(*args)
File "F:\anaconda\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 500: Internal Server Error