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

failing to reload file (maybe bug?) #471

Open
daniel-caichac-DHI opened this issue Nov 29, 2024 · 4 comments
Open

failing to reload file (maybe bug?) #471

daniel-caichac-DHI opened this issue Nov 29, 2024 · 4 comments
Labels
bug Something isn't working question Further information is requested

Comments

@daniel-caichac-DHI
Copy link
Collaborator

daniel-caichac-DHI commented Nov 29, 2024

Hi, I am getting some unexpected issue when trying to do the following, in steps.

  • obs = load model skill track observation (from a dataframe, let's be original and call it df)
  • mod = modelskill.Modelresult(file.dfsu) # must be an area dfsu
  • cc = modelskill.match(obs,mod)
  • comparer_list = append (cc) #just store in a list
    so far so good, no issues. Now I happen to have another track during the ~same time span, from a different provider, so I have it in another csv, and what I am trying to do is to attach it to the comparer list to convert later to a comparer collection, but cannot reach that step, since it fails before when I do the following steps:
  • obs = load model skill track observation #(the OTHER observation, this works)
  • mod = modelskill.Modelresult(file.dfsu) # Here I call the same dfsu as before.
  • cc = modelskill.match(obs,mod) # CRASH, I get error Exception: Could not load file .....file.dfsu (Error code 2003)
    so I cannot reach the point to the comparer collection.

I tried removing the second mod = ... line since it is the same dfsu so kind of pointless to re-define the ModelResult, and if I do, I get the same error.

I feel like after the first cc.match mikecore is failing to flush/close the Dfsu file, and if I try to pair it later to another observation, it cannot be opened because it is 'already' open.

@daniel-caichac-DHI daniel-caichac-DHI added bug Something isn't working question Further information is requested labels Nov 29, 2024
@ecomodeller
Copy link
Member

ecomodeller commented Nov 29, 2024

Can you provide the stack trace related to Exception: Could not load file .....file.dfsu (Error code 2003)?

@daniel-caichac-DHI
Copy link
Collaborator Author

let me make a failing notebook

@daniel-caichac-DHI
Copy link
Collaborator Author

I am getting this error again :/
Let me try to make a failing test this week

@ecomodeller
Copy link
Member

Can you open the file using mikeio?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants