<div dir="ltr"><div>Buongiorno a tutti, sono uno studente universitario alle prese con Qgis (livello principiante) e non riesco a svolgere la geocodifica degli indirizzi della mia città con MMQGIS (circa 5000 indirizzi).</div><div>Premetto che ho un file CSV con una colonna con riportati tutti indirizzi completi di civico, esponente, comune, cap, città. Inoltre, nelle colonne accanto ho aggiunto in modo separato solo quelle relative alla città, cap, provincia e paese. Una volta settato tutto quanto nella sezione "Geocode CSV with Web Service", mi esce questo avviso:</div><div><br></div><div>

<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-weight:600;color:rgb(255,0,0)">An error has occurred while executing Python code:</span> <br></p>
<p style="margin:14px 0px 12px;text-indent:0px;white-space:pre-wrap"><span style="font-size:large;font-weight:600">UnboundLocalError: local variable 'attributes' referenced before assignment </span></p>
<pre style="margin:12px 0px;text-indent:0px"><span style="font-family:"Courier New"">Traceback (most recent call last):<br>  File "C:/Users/xxxx/AppData/Roaming/QGIS/QGIS3\profiles\xxxx/python/plugins\mmqgis\mmqgis_dialogs.py", line 1384, in run<br>    output_file_name, not_found_file_name, self.mmqgis_status_callback)<br>  File "C:/Users/xxxx/AppData/Roaming/QGIS/QGIS3\profiles\xxxx/python/plugins\mmqgis\mmqgis_library.py", line 2150, in mmqgis_geocode_web_service<br>    notwriter.writerow(attributes)<br>UnboundLocalError: local variable 'attributes' referenced before assignment<br></span></pre>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><br><span style="font-weight:600">Python version:</span> 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] <br><span style="font-weight:600">QGIS version:</span> 3.10.0-A Coruña A Coruña, 6ffa89eb3e <br></p>
<p style="margin:12px 0px;text-indent:0px;white-space:pre-wrap"><span style="font-size:medium;font-weight:600">Python Path:</span></p>
<ul style="margin:0px"><li style="margin:12px 0px 0px;text-indent:0px;white-space:pre-wrap">C:/PROGRA~1/QGIS3~1.10/apps/qgis/./python</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:/Users/xxxx/AppData/Roaming/QGIS/QGIS3\profiles\xxxx/python</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:/Users/xxxx/AppData/Roaming/QGIS/QGIS3\profiles\xxxx/python/plugins</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:/PROGRA~1/QGIS3~1.10/apps/qgis/./python/plugins</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:\Program Files\QGIS 3.10\bin\python37.zip</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:\PROGRA~1\QGIS3~1.10\apps\Python37\DLLs</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:\Program Files\QGIS 3.10\bin</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:\PROGRA~1\QGIS3~1.10\apps\Python37</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\win32</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\win32\lib</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\Pythonwin</li><li style="margin:0px;text-indent:0px;white-space:pre-wrap">C:/Users/xxxx/AppData/Roaming/QGIS/QGIS3\profiles\xxxx/python</li><li style="margin:0px 0px 12px;text-indent:0px;white-space:pre-wrap">C:\Users\xxxx\AppData\Roaming\QGIS\QGIS3\profiles\xxxx\python\plugins\mmqgis/forms</li></ul><div>Ho provato a fare la stessa cosa con un CSV con soltanto 100 indirizza ma il problema si ripresenta.<br></div><div><br></div><div>Non uso nessuna Google API Key. Ho impostato OSM/Nominatim perchè non richiede alcuna key e, sinceramente, non so se devo mettere le due directory output in un posto preciso o se posso scegliere io (a volte esce anche un messaggio dove mi avvisa che il nome del file non è una directory).</div><div><br></div><div><br></div><div>Spero di essere stato il più preciso possibile. <br></div><div>PS: Se per risolvere questo problema devo inserire dei comandi su Phyton, vi avviso che non l'ho ancora usato e non saprei proprio come muovermi lì dentro.</div><div>Grazie e buona giornata.<br></div> </div></div>