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

Warn users of potential incompatibilities between MIKE+Py with MIKE IO #46

Open
ryan-kipawa opened this issue Sep 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ryan-kipawa
Copy link
Collaborator

ryan-kipawa commented Sep 30, 2024

There is currently compatibility issues between MIKE+Py and MIKE IO. Resolving this issue is ongoing work outside of MIKE+Py. The errors that users get are completely unobvious that this is the cause, which results in some frustrating periods debugging, installing/deinstalling software. Examples of these errors:

Example 1 from #39

SQLiteException: code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error
Det angivne modul blev ikke fundet.
ved DHI.Amelia.DataModule.Services.DataSource.DataSourceSpatiaLite.OpenDatabaseCore()
ved DHI.Amelia.DataModule.Services.DataSource.BaseDataSource.OpenDatabase()

Example 2 from #33

SQLiteException: code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error
The specified module could not be found.
at DHI.Amelia.DataModule.Services.DataSource.DataSourceSpatiaLite.OpenDatabaseCore()
at DHI.Amelia.DataModule.Services.DataSource.BaseDataSource.OpenDatabase()

While this issue is being resolved, I suggest providing more clear warnings to users:

Situation 1: mikeio was already imported:

import mikeio
import mikeplus

NotImplementedError: "mikeplus cannot currently be used with mikeio in the same script."

Situation 2: mikeio was imported after mikeplus (hooks onto main API entry points)

import mikeplus
from mikeplus import DataTableAccess
from mikeplus.engines import Engine1D
import mikeio

dta = DataTableAccess(test.sqlite)

NotImplementedError: "mikeplus cannot currently be used with mikeio in the same script."

Hopefully this will at least save users some time while this issue is being resolved 😄

@ryan-kipawa ryan-kipawa added the enhancement New feature or request label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant