GIScience / orstools-qgis-plugin

Plugin for QGIS with a set of tools to use openrouteservice API´s, based on openstreetmap
https://plugins.qgis.org/plugins/ORStools/
MIT License
92 stars 31 forks source link

OSM tools not working - Python Error #62

Closed astronaut4 closed 6 years ago

astronaut4 commented 6 years ago

Hi there,

OSM tools hasn't been working for me and my colleagues for some time recently. I get the following error. Could you help me with that? I tried to run OSM tools in different versions of QGIS (2.14, 2.18 and 3.2).

Thank you,

Panos

2018-07-02T16:30:55 WARNING Traceback (most recent call last): File "C:/Users/Panos Floros/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\geocode.py", line 17, in reverse_geocode response = client.request('/geocoding', params)['features'][0] File "C:/Users/Panos Floros/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\client.py", line 162, in request result = self._get_body(response) File "C:/Users/Panos Floros/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\client.py", line 185, in _get_body body = response.json() File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\requests\models.py", line 892, in json return complexjson.loads(self.text, **kwargs) File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\simplejson__init__.py", line 516, in loads return _default_decoder.decode(s) File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\simplejson\decoder.py", line 377, in decode raise JSONDecodeError("Extra data", s, end, len(s)) simplejson.scanner.JSONDecodeError: Extra data: line 1 column 5 - line 2 column 1 (char 4 - 19)

         During handling of the above exception, another exception occurred:

         Traceback (most recent call last):
          File "C:/Users/Panos Floros/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\dialog.py", line 284, in _writeCoordinateLabel
          point)
          File "C:/Users/Panos Floros/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\geocode.py", line 19, in reverse_geocode
          raise ValueError("Your input coordinates are invalid for geocoding.")
         ValueError: Your input coordinates are invalid for geocoding.
civil142 commented 6 years ago

Exactly the issue I am getting. Fingers crossed for a fix soon! :-). EDIT: I note your coordinates are invalid from the file output. Ensure that your files are saved as WGS 84 CRS and you are viewing in WGS 84 CRS. I have had issues trying to use data in different CRS previously. Worth removing this issue.

nilsnolde commented 6 years ago

Duplicate of #59 (I hope).