-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issues using DataTableAccess (rookie issue) #33
Comments
This exception happens when the MIKE+ version is conflict or the database file path is invalid.
If there are still no progress, I'll check it further. |
Hi @wuwwen thanks for looking at my problem. I have tried to use the absolute path, both using the classic "file_path=os.path.join(folder_path, file_name)" and also just raw typing the entire thing into DataTableAccess(...), but neither worked. I hope this can narrow the issue down further. |
@SofusNL How are you doing here? We can't reproduce your issue on our side. That why there is no fix for the time being.
Anything missing in our steps? |
Hi
Yes the steps are in fact correct, but I think the order here might be
important. I first and foremost do modelling, so I have both the 2023 (for
the import/export functionality) and 2024 (for everything else). I have
tried to delete the 2023 versions from my PC, but that didn't solve the
problem. Is it possible that if you are running both (or have had) that you
get the error I mentioned?
For step 4, I just want it to be clear that I am using pip install inside
the anaconda prompt, to make sure everything is in the correct directory.
I will try importing it again on a completely "clean" PC next week and
see what happens.
Med venlig hilsen/Kind regards
*Sofus Normann Laulund*
*Projektingeniør, Plan og Model, Forsyning Vest*
*Civilingeniør Vand og Miljø*
KRÜGER A/S
tlf.: +45 60 37 07 78 / email: ***@***.***
Krüger A/S / Haslegårdsvænget 18 / 8210 Aarhus V / Denmark
Krüger A/S / Indkildevej 6C / 9210 Aalborg SØ/ Denmark
CVR: 57446412 - www.kruger.dk <https://www.kruger.dk/>
[image: Krüger_Veolia_RGB_200px.jpg] <https://www.kruger.dk/>
<https://www.facebook.com/KrugerDK>
<https://www.linkedin.com/company/kruger-as>
***@***.***>
Den ons. 5. jun. 2024 kl. 04.37 skrev wuwwen ***@***.***>:
… @SofusNL <https://github.com/SofusNL> How are you doing here? We can't
reproduce your issue on our side. That why there is no fix for the time
being.
What we have done is below:
1. Created env by using conda.
2. Installed all the necessary libs (numpy, pandas, python 11)
3. Installed MIKE+ 2024
4. Install mikepluspy package by using "pip install
https://github.com/DHI/mikepluspy/archive/refs/tags/v2024.0-latest.zip"
5. Open Spyder to execute below code. It can open the database
successfully. Please remember to use the new created env in Spyder.
from mikeplus import DataTableAccess
data_access = DataTableAccess("example.sqlite")
data_access.open_database()
data_access.close_database()
print("Sqlite database opened successed.")
Anything missing in our steps?
—
Reply to this email directly, view it on GitHub
<#33 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHQ7JO3WNCGDHLZA5ORVTQLZFZ2VFAVCNFSM6AAAAABFTPAUUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBYG42DQNBXGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
The information in this email and any associated files is confidential to
Veolia Water Technologies (SASU) and/or any affiliate thereof and may be
legally privileged. For the herein purposes, “affiliate” means any legal
entity, partnership, joint venture, equity, company, including in
particular any and all subsidiary which, directly or indirectly, controls
Veolia Water Technologies (SASU) and/or is under the control thereof and/or
is under the control of the ultimate parent company thereof, and “control”
means the ability to directly or indirectly, direct the affairs of a third
party by means of ownership, contract or otherwise. It may also contain
information that is subject to copyright or constitutes a trade secret. It
is intended solely for the named recipient. Access to this email by anyone
else is unauthorized.
If you are not the intended recipient, please note
that any use, disclosure, copying, distribution of this email or any action
taken or omitted to be taken in reliance on its prohibited.
Warning:
Although this email and any attachment thereto are believed to be free from
viruses, it is the responsibility of the recipient to ensure that they are
virus free. No responsibility whatsoever is accepted by Veolia for any loss
or damage arising from their receipt or opening.
|
Hej @SofusNL Jeg tillader mig at spørg om du fik løst dit problem. På forhånd tak. |
Hello.
I have previously used both mikeio and mikeio1D with great succes. I am now trying to get started using mikepluspy following the examples on here. I simply run the code below, which causes the error also seen below.
I am using anaconda + spyder (Python 3.11), which hasn't caused any issues with mikeio and mikeio1D, when installing using pip in the anaconda prompt. Similarly I am using mike+ 2024 for both mikepluspy and mike+.
import mikeplus
from mikeplus import DataTableAccess
from mikeplus.engines import Engine1D
import clr
import os
dta = DataTableAccess(test.sqlite)
dta.open_database()
dta.is_database_open()
Which results in the error:
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()
I have tried also including the following, which did not help, as well as trying to clr.AddReference() the two modules above, but perhaps that doesn't make sense, at least it did not work.
clr.AddReference("System")
clr.AddReference("System.Runtime")
clr.AddReference("System.Threading")
clr.AddReference("System.Runtime.InteropServices")
clr.AddReference("DHI.Amelia.DataModule")
clr.AddReference("DHI.Amelia.DataModule.Interface")
clr.AddReference("DHI.Amelia.Infrastructure.Interface")
clr.AddReference("DHI.Amelia.GlobalUtility")
clr.AddReference("DHI.Amelia.DomainServices")
clr.AddReference("DHI.Amelia.DomainServices.Interface")
I hope this is the correct place to post my issues, otherwise feel free to direct my to another place.
The text was updated successfully, but these errors were encountered: