Skip to content

An error occurred while executing Python code on launch #493

Open

Description

@VulcanTrekkie45

Getting an error while trying to launch QuickOSM saying that there was an error while trying to execute the Python code. I tried reinstalling the plugin, as well as updating QGIS, but I'm still getting the same error. I don't know what's going on and I'm hoping that I can get some help in figuring out what's going on.

Error stack trace:

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 
Traceback (most recent call last):
  File "C:\Users/sbrow/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\quick_osm.py", line 249, in open_dialog
    dialog = Dialog()
  File "C:\Users/sbrow/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\ui\dialog.py", line 205, in __init__
    panel.setup_panel()
  File "C:\Users/sbrow/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\ui\quick_query_panel.py", line 134, in setup_panel
    self.update_history_view()
  File "C:\Users/sbrow/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QuickOSM\ui\quick_query_panel.py", line 304, in update_history_view
    data = json.load(json_file, object_hook=as_enum)
  File "C:\PROGRA~1\QGIS 3.34.4\apps\Python39\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\PROGRA~1\QGIS 3.34.4\apps\Python39\lib\json\__init__.py", line 359, in loads
    return cls(**kw).decode(s)
  File "C:\PROGRA~1\QGIS 3.34.4\apps\Python39\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\PROGRA~1\QGIS 3.34.4\apps\Python39\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


Python version: 3.9.18 (heads/master:5eba59e, Feb  1 2024, 20:02:10) [MSC v.1929 64 bit (AMD64)] 
QGIS version: 3.34.4-Prizren Prizren, decd43dc 

Python Path:
C:\Users/sbrow/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\leastcostpath
C:/PROGRA~1/QGIS 3.34.4/apps/qgis-ltr/./python
C:/Users/sbrow/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/sbrow/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS 3.34.4/apps/qgis-ltr/./python/plugins
C:\PROGRA~1\QGIS 3.34.4\apps\grass\grass83\etc\python
C:\Users\sbrow\Documents
C:\Program Files\QGIS 3.34.4\bin\python39.zip
C:\PROGRA~1\QGIS 3.34.4\apps\Python39\DLLs
C:\PROGRA~1\QGIS 3.34.4\apps\Python39\lib
C:\Program Files\QGIS 3.34.4\bin
C:\PROGRA~1\QGIS 3.34.4\apps\Python39
C:\PROGRA~1\QGIS 3.34.4\apps\Python39\lib\site-packages
C:\PROGRA~1\QGIS 3.34.4\apps\Python39\lib\site-packages\win32
C:\PROGRA~1\QGIS 3.34.4\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS 3.34.4\apps\Python39\lib\site-packages\Pythonwin
C:/Users/sbrow/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/sbrow/New folder

Activity

  1. Gustry commented on Mar 4, 2024

    @Gustry
    Collaborator

    Can you share your JSON file here ?

    • QGIS → Settings → User profiles → Open active profile directory
    • QuickOSM folder, then make a ZIP of query_history ? I don't know of many files you have and which one is impacted in this folder.

    Then, if you want to overpass this issue, just remove this folder.

  2. VulcanTrekkie45 commented on Mar 7, 2024

    @VulcanTrekkie45
    Author

    Can you share your JSON file here ?

    • QGIS → Settings → User profiles → Open active profile directory
    • QuickOSM folder, then make a ZIP of query_history ? I don't know of many files you have and which one is impacted in this folder.

    Then, if you want to overpass this issue, just remove this folder.

    Here is the query_history folder on Dropbox. Let me know if you can access this and if so, how we can fix this.

  3. Gustry commented on Mar 7, 2024

    @Gustry
    Collaborator

    Yes, I was going to suggest to you to remove your previous link, sorry. You did it. (you shared more than expected before, with possible sensitive data)

    You can remove your folder, I have downloaded it, I will have a look.

    In the meantime, you can remove the folder, this will solve your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions