riccardoklinger / Hqgis

A Plugin for QGIS to use the HERE API
GNU General Public License v3.0
45 stars 10 forks source link

Dont`t get hqgis to run #84

Closed Kai-Behncke closed 2 months ago

Kai-Behncke commented 2 months ago

Hi there, I try to use Hqgis (Version 1.2.3) in QGIS 3.36.2-Maidenhead.

I activated the plugin, got an API-key (I took the Rest-Api, the Key is even activated) and tried to use a single adress Isochrones. I click in the map and get correctly "Ankerstraße 11, 49479 Ibbenbüren, Germany).

But if I start the Isochrones-calculation QGIS gives me:

Traceback (most recent call last): File "C:\Users/Superkai/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Hqgis\hqgis.py", line 855, in geocodeline url = "https://geocode.search.hereapi.com/v1/geocode?apiKey=" + \ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: can only concatenate str (not "NoneType") to str

It looks like the API-Key does not work? I already got three or four keys but I always get that error.

In another report I saw your advice to try to Geocode: Filosofos 85, Jardines de Churubusco,09410 Iztapalapa,CMx,Mexico

But also there I get:

2024-07-05T15:00:56 WARNING Traceback (most recent call last): File "C:\Users/**/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Hqgis\hqgis.py", line 515, in geocode "https://geocode.search.hereapi.com/v1/geocode?apiKey=" TypeError: can only concatenate str (not "NoneType") to str

The very weird thing is: My Api-Code seems to work in a browser: If I try: https://geocode.search.hereapi.com/v1/geocode?apiKey=*****************************&q=Filosofos%2085,%20Jardines%20de%20Churubusco,09410%20Iztapalapa,CMx,Mexico

I have no proxy at all running here. Do you have any idea what I can do?

Kai-Behncke commented 2 months ago

Meanwhile, I went in the sourcecode. If I put a fixed url in hqgis.py (line 1209) like: url="https://isoline.router.hereapi.com/v8/isolines?apiKey=**********************&range[type]=distance&range[values]=200,300,400&origin=52.22205.7.68324&routingMode=fast&transportMode=car" I get a result in QGIS. It seems, somehow, that hqgis does not take the parameter via the interface.

riccardoklinger commented 2 months ago

Hi Kai-Behncke,

can you please check the following: Settings -> Options -> Advanced -> disable "use new settings tree widget and press "I will be carful" -> check for your key in a setting called HQGIS: grafik

By pressing the save button in the hqgis credentials dialog. it should be listed here. This is also the place where the key is stored.

Tested with QGIS 3.34


"The best model for a cat is another, or preferably the same cat."

Kai-Behncke commented 2 months ago

Hi Ricardo, thank you very much. I reinstalled QGIS and HQgis and then it worked :-)