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

Error when opening saved model #108

Open
SCLaan opened this issue Feb 22, 2024 · 1 comment
Open

Error when opening saved model #108

SCLaan opened this issue Feb 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@SCLaan
Copy link
Collaborator

SCLaan commented Feb 22, 2024

Severity Level

Medium

Steps to reproduce

  1. Generate a model, going through all steps in the Model Maker tab
  2. Optionally build the model
  3. Save the model
  4. Select working directory
  5. Load sfincs.inp

Current behaviour

I get no user feedback in the GUI and see the error below in my terminal. Note that it is the same error twice, first when setting the working directory and afterwards when loading the .inp.

Map is ready
Traceback (most recent call last):
  File "C:\Users\laan_st\.conda\envs\ddb_floodadapt\Lib\site-packages\guitares\pyqt5\menu.py", line 21, in menu_item_selected
    callback(option)
  File "C:\Users\laan_st\OneDrive - Stichting Deltares\Documents\GitHub\DelftDashboard\src\delftdashboard\menu\file.py", line 49, in open
    app.active_model.open()
  File "C:\Users\laan_st\OneDrive - Stichting Deltares\Documents\GitHub\DelftDashboard\src\delftdashboard\models\sfincs_hmt\sfincs_hmt.py", line 278, in open
    root = os.path.dirname(fname)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen ntpath>", line 251, in dirname
  File "<frozen ntpath>", line 213, in split
TypeError: expected str, bytes or os.PathLike object, not tuple
No method select_working_directory for model:  fiat
Traceback (most recent call last):
  File "C:\Users\laan_st\.conda\envs\ddb_floodadapt\Lib\site-packages\guitares\pyqt5\menu.py", line 21, in menu_item_selected
    callback(option)
  File "C:\Users\laan_st\OneDrive - Stichting Deltares\Documents\GitHub\DelftDashboard\src\delftdashboard\menu\file.py", line 49, in open
    app.active_model.open()
  File "C:\Users\laan_st\OneDrive - Stichting Deltares\Documents\GitHub\DelftDashboard\src\delftdashboard\models\sfincs_hmt\sfincs_hmt.py", line 278, in open
    root = os.path.dirname(fname)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen ntpath>", line 251, in dirname
  File "<frozen ntpath>", line 213, in split
TypeError: expected str, bytes or os.PathLike object, not tuple

Note that fiat is mentioned in the error. However, I am trying to load a SFINCS model here. Maybe it is looking for the wrong file?

Desired behaviour

Should this work, or is Open only inteded for models that have been built?
In any case, there should be some user feedback in the GUI when this doesn't work.

Additional context

I'm using the latest version of DelftDashboard (branch: FloodAdapt_ModelBuilders, commit: f91f5f2)

@roeldegoede
Copy link
Collaborator

Yep, this partly links to #102 . Didn't work yet on reading in the entire model, but that is high on my list. The FIAT errorsare due to an erronuous commit, so we have to fix this.

@LuukBlom LuukBlom added the bug Something isn't working label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants