3liz / QuickOSM

QGIS plugin to fetch OSM data with the Overpass API
GNU General Public License v2.0
180 stars 54 forks source link

An error has occurred while executing Python code #473

Closed lodziek closed 10 months ago

lodziek commented 10 months ago

What is the bug?

`2023-08-09T22:29:10 INFO ["All OSM objects with the key 'amenity'='school' in Bousse are going to be downloaded."] 2023-08-09T22:29:10 INFO Query: amenity_school_Bousse 2023-08-09T22:29:10 CRITICAL Download failed: Error transferring https://nominatim.qgis.org/search?q=Bousse&format=json&info=QgisQuickOSMPlugin - server replied: Method Not Allowed 2023-08-09T22:35:19 CRITICAL A critical error occurred, this is the traceback: 2023-08-09T22:35:19 CRITICAL
2023-08-09T22:35:19 CRITICAL base_processing_panel.py 2023-08-09T22:35:19 CRITICAL [Errno 2] No such file or directory: 'C:/Users/DELL/AppData/Local/Temp/request-iEPxeP.json' 2023-08-09T22:35:19 CRITICAL File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\ui\base_processing_panel.py", line 59, in run_saved_query self._run_saved_query(data)

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\ui\quick_query_panel.py", line 398, in _run_saved_query
          num_layers = process_quick_query(

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\process.py", line 318, in process_quick_query
          return process_query(

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\process.py", line 251, in process_query
          final_query = query.prepare_query()

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\query_preparation.py", line 314, in prepare_query
          self._replace_geocode_area()

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\query_preparation.py", line 283, in _replace_geocode_area
          self._query_prepared = re.sub(template, lambda m: replace(

          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\re.py", line 210, in sub
          return _compile(pattern, flags).sub(repl, string, count)

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\query_preparation.py", line 283, in 
          self._query_prepared = re.sub(template, lambda m: replace(

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\query_preparation.py", line 263, in replace
          osm_id = self._nominatim.get_first_polygon_from_query(search)

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\api\nominatim.py", line 97, in get_first_polygon_from_query
          data = self.query(query)

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\api\nominatim.py", line 70, in query
          with open(self.result_path, encoding='utf8') as json_file:
         `
Include some logs here, in QGIS Logs panel, bottom right icon, the small bubbles, in the QuickOSM tab.

`2023-08-09T22:29:10 INFO ["All OSM objects with the key 'amenity'='school' in Bousse are going to be downloaded."] 2023-08-09T22:29:10 INFO Query: amenity_school_Bousse 2023-08-09T22:29:10 CRITICAL Download failed: Error transferring https://nominatim.qgis.org/search?q=Bousse&format=json&info=QgisQuickOSMPlugin - server replied: Method Not Allowed 2023-08-09T22:35:19 CRITICAL A critical error occurred, this is the traceback: 2023-08-09T22:35:19 CRITICAL
2023-08-09T22:35:19 CRITICAL base_processing_panel.py 2023-08-09T22:35:19 CRITICAL [Errno 2] No such file or directory: 'C:/Users/DELL/AppData/Local/Temp/request-iEPxeP.json' 2023-08-09T22:35:19 CRITICAL File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\ui\base_processing_panel.py", line 59, in run_saved_query self._run_saved_query(data)

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\ui\quick_query_panel.py", line 398, in _run_saved_query
          num_layers = process_quick_query(

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\process.py", line 318, in process_quick_query
          return process_query(

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\process.py", line 251, in process_query
          final_query = query.prepare_query()

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\query_preparation.py", line 314, in prepare_query
          self._replace_geocode_area()

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\query_preparation.py", line 283, in _replace_geocode_area
          self._query_prepared = re.sub(template, lambda m: replace(

          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\re.py", line 210, in sub
          return _compile(pattern, flags).sub(repl, string, count)

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\query_preparation.py", line 283, in 
          self._query_prepared = re.sub(template, lambda m: replace(

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\query_preparation.py", line 263, in replace
          osm_id = self._nominatim.get_first_polygon_from_query(search)

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\api\nominatim.py", line 97, in get_first_polygon_from_query
          data = self.query(query)

          File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\api\nominatim.py", line 70, in query
          with open(self.result_path, encoding='utf8') as json_file:
         `

python log panel 2023-08-09T22:39:35 WARNING Traceback (most recent call last): File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\core\api\nominatim.py", line 48, in error raise NetWorkErrorException('Nominatim API', ', '.join(messages)) QuickOSM.core.exceptions.NetWorkErrorException: Nominatim API : Download failed: Error transferring https://nominatim.openstreetmap.org/search?q=Bousse&format=json&info=QgisQuickOSMPlugin - server replied: Method Not Allowed

Environment

Gustry commented 10 months ago

Duplicate of #472

lodziek commented 10 months ago

Duplicate of #472

Thanks for the redirection. So if the problem comes from the server, I don't understand how a server can refuse the basic POST request !!!! It's unbelievable. Anyway, I'll wait if something will change.