Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python error at startup if working dir contains invalid folder #977

Open
leendertvanwolfswinkel opened this issue Feb 19, 2024 · 0 comments
Labels

Comments

@leendertvanwolfswinkel
Copy link
Collaborator

leendertvanwolfswinkel commented Feb 19, 2024

If you unzip this folder into your 3Di working directory:

Prinseneiland 27.zip

You will get the error below.

I think the issue is that the "grid" sub-directory is missing. I think it should just ignore the folder and continue in this case

Probably is preferable to solve this issue in threedi-mi-utils

TypeError: expected str, bytes or os.PathLike object, not NoneType 
Traceback (most recent call last):
  File "C:\PROGRA~1/3DIMOD~1.28/apps/qgis-ltr/./python\qgis\utils.py", line 448, in startPlugin
    plugins[packageName].initGui()
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\3Di Staging/python/plugins\threedi_results_analysis\threedi_plugin.py", line 109, in initGui
    self.dockwidget = ThreeDiPluginDockWidget(None, iface)
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\3Di Staging/python/plugins\threedi_results_analysis\gui\threedi_plugin_dockwidget.py", line 63, in __init__
    self.dialog = ThreeDiPluginGridResultDialog(self)
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\3Di Staging/python/plugins\threedi_results_analysis\gui\threedi_plugin_grid_result_dialog.py", line 66, in __init__
    self.refresh()
  File "C:\Users\leendert.vanwolfswin\AppData\Roaming\3Di\QGIS3\profiles\3Di Staging/python/plugins\threedi_results_analysis\gui\threedi_plugin_grid_result_dialog.py", line 222, in refresh
    if num_of_results == 0 and os.path.exists(os.path.join(local_revision.grid_dir, "gridadmin.h5")):
  File "C:\PROGRA~1\3DIMOD~1.28\apps\Python39\lib\ntpath.py", line 78, in join
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant