MrXiaoXiao / ESPRH

Automatic earthquake catalog building workflow: EQTransformer + Siamese EQTransformer + PickNet + REAL + HypoInverse
MIT License
18 stars 4 forks source link

urllib.error.HTTPError: HTTP Error 400: Bad Request #9

Closed Gaoya423 closed 1 year ago

Gaoya423 commented 1 year ago

图片 Traceback (most recent call last): File "/home/gy/MODEL/model/ESPRH-main/06_Simple_data_visualization.py", line 145, in m.arcgisimage(service='ESRI_Imagery_World_2D', xpixels = 1000, verbose= True) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/site-packages/mpl_toolkits/basemap/init.py", line 4271, in arcgisimage return self.imshow(imread(urlopen(basemap_url)),ax=ax, File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 564, in error result = self._call_chain(args) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 756, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(args) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/home/gy/anaconda3/envs/ESPRH/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: Bad Request 肖老师,您好。这是我在跑simple_data_visualization时,出现的问题,是环境配置错误吗?怎么修改呢?

MrXiaoXiao commented 1 year ago

您好,这段代码是从arcgis上面下载绘图的底图,可能是网络或者其它问题导致程序出错。

您可以将这段代码注释掉

m.arcgisimage(service='ESRI_Imagery_World_2D', xpixels = 1000, verbose= True)

绘图结果除了缺少背景地形图不会有其它区别。

Gaoya423 commented 1 year ago

注释掉了,但是无法运行出现“urllib.error.HTTPError: HTTP Error 400: Bad Request”

Gaoya423 commented 1 year ago

图片

MrXiaoXiao commented 1 year ago

这个函数不只出现了一次,请都注释掉