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

Remove scenario from db using #406

Closed
byersiiasa opened this issue Mar 19, 2021 · 1 comment
Closed

Remove scenario from db using #406

byersiiasa opened this issue Mar 19, 2021 · 1 comment
Labels
backend.jdbc Interaction with ixmp_source via JDBCBackend & JPype bug duplicate

Comments

@byersiiasa
Copy link
Member

byersiiasa commented Mar 19, 2021

Remove scenario from db using backend using mp._backend.jobj.removeRunid(run_id) method (possibly deprecated?

import ixmp
mp = ixmp.Platform(dbprops=config)
model = "GEMINI-E3\+CHE\+3.0"  ## horrible name hence removal
scenario = '10TPC_etsUni'
s = ixmp.Scenario(mp, model, scenario, version=1)
run_id = s.run_id()
mp._backend.jobj.removeRunid(run_id)

Traceback (most recent call last):

  File "Platform.java", line 201, in at.ac.iiasa.ixmp.Platform.removeRunid

  File "DbDAO.java", line 628, in at.ac.iiasa.ixmp.database.DbDAO.setStatus

  File "DbDAO.java", line 634, in at.ac.iiasa.ixmp.database.DbDAO.setStatus

  File "DbDAO.java", line 1088, in at.ac.iiasa.ixmp.database.DbDAO.loggedIxException

Exception: Java Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "<ipython-input-94-8ce65f2499bd>", line 1, in <module>
    mp._backend.jobj.removeRunid(run_id)

at.ac.iiasa.ixmp.exceptions.IxException: at.ac.iiasa.ixmp.exceptions.IxException: Cannot set scenario status to NONE

Expected scenario to be removed. Tested this on both ar6 and ar6_sanbox databases.

I tried looking in the docs and the source code but I don't see it under the Platform class. I don't think the method was documented originally also.

Thanks in advance

Versions

ixmp: 3.2.1.dev41+g6e52639
message_ix: None
message_data: None

click: 7.1.2
dask: 2.30.0
graphviz: 0.14.2
jpype: 1.2.1
… JVM path: C:\Program Files\Java\jre1.8.0_271\bin\server\jvm.dll
openpyxl: 3.0.5
pandas: 1.1.5
pint: 0.16.1
xarray: 0.16.2
yaml: 5.3.1

iam_units: installed
jupyter: installed
matplotlib: 3.3.3
plotnine: None
pyam: 0.8.0+40.ge027675
e027675 (HEAD -> master, origin/master, origin/HEAD) Merge branch 'danielhuppmann-io/excel-multiple-sheet'

GAMS: 'gams' executable not in PATH

python: 3.8.6 | packaged by conda-forge | (default, Nov 27 2020, 18:58:29) [MSC v.1916 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en
LOCALE: English_United Kingdom.utf8

'gams' is not recognized as an internal or external command,
operable program or batch file.

@byersiiasa byersiiasa added bug backend.jdbc Interaction with ixmp_source via JDBCBackend & JPype labels Mar 19, 2021
@khaeru
Copy link
Member

khaeru commented Mar 20, 2021

This is a duplicate of #382. The status quo as described at #382 (comment) remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend.jdbc Interaction with ixmp_source via JDBCBackend & JPype bug duplicate
Projects
None yet
Development

No branches or pull requests

2 participants