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

unable to delete scenario #382

Open
byersiiasa opened this issue Nov 18, 2020 · 11 comments
Open

unable to delete scenario #382

byersiiasa opened this issue Nov 18, 2020 · 11 comments
Labels
backend.jdbc Interaction with ixmp_source via JDBCBackend & JPype bug

Comments

@byersiiasa
Copy link
Member

Trying to delete scenarios in backend using command
mp._backend.jobj.removeRunid(run_id)

This manually deletes a scenario. I have tested it on IXSE_AR6 and also IXSE_SANDBOX. This worked about 2 months ago, with presumably a slightly older version of ixmp - new machine and python installation in past weeks, so it could be a problem with my configuration but not sure.
I reinstalled ixmp and ran pytest and it appears the only errors were related to (not having) gams.

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-84-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

Versions

ixmp:        3.1.1.dev27+ga3864a9
     a3864a9 (HEAD -> master, origin/master, origin/HEAD) Add #378 to release notes
message_ix:  None
message_data: None

click:       7.1.2
dask:        2.30.0
graphviz:    0.14.2
jpype:       1.1.2
… JVM path:  C:\Program Files\Java\jre1.8.0_271\bin\server\jvm.dll
pandas:      1.1.3
pint:        0.16.1
xarray:      0.16.1
xlrd:        1.2.0
xlsxwriter:  1.3.7
yaml:        5.3.1

iam_units:   installed
jupyter:     installed
matplotlib:  3.3.2
plotnine:    None
pyam:        0.8.0+4.gc1ec71f

GAMS:        'gams' executable not in PATH

python:      3.8.5 (default, Sep  3 2020, 21:29:08) [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 backend.jdbc Interaction with ixmp_source via JDBCBackend & JPype bug labels Nov 18, 2020
@byersiiasa
Copy link
Member Author

I tested with v3.1.0 and v3.0.0 and same issue
So not sure if this is to do with the new server config or still issue with my machine...

@khaeru
Copy link
Member

khaeru commented Nov 18, 2020

PR iiasa/ixmp_source#343 was opened for this on 25 September and is pending review.

I don't think there is a corresponding issue in ixmp_source, so there is no further information on when that change was made on the Java side. The easiest way to find out would be to look at the blame for the related file(s).

@byersiiasa
Copy link
Member Author

thanks @khaeru - so this means it won't work until the PR is merged , i.e. if I use older versions on ixmp it is still unlikely to work?

@khaeru
Copy link
Member

khaeru commented Nov 18, 2020

so this means it won't work until the PR is merged

Correct.

if I use older versions on ixmp it is still unlikely to work?

It means I can't tell how many versions you would need to go back in order for it to work.

@byersiiasa
Copy link
Member Author

right ok - I see what you mean.

@byersiiasa
Copy link
Member Author

@fonfon merged that PR in ixmp_source - and I have tested with a recompiled ixmp.jar - and it appears to work - thanks both for your help

@khaeru
Copy link
Member

khaeru commented Nov 18, 2020

Thanks @fonfon!

@byersiiasa (and cc @volker-krey) we will have to figure out who should take care of creating PRs to update the ixmp.jar in this repository at times when ixmp_source is updated. This is not done automatically, and was previously handled manually by @zikolach.

@khaeru
Copy link
Member

khaeru commented Mar 20, 2021

#406 was just filed as a duplicate of this issue, suggesting there's some urgency to this or a continued need to fix it. As I wrote in November:

we will have to figure out who should take care of creating PRs to update the ixmp.jar in this repository at times when ixmp_source is updated.

@byersiiasa
Copy link
Member Author

I did have deja vu but strange that i couldn't find this issue when I searched. Thanks @khaeru

@byersiiasa
Copy link
Member Author

any glimmer of a resolution for this issue? I have tens of scenarios to delete from AR6, 100s when considering all the versions.

@danielhuppmann Scenario Management delete function appears to work - do you know how / why? This interface would be ok - IF one could delete all scenario versions (runids) at the same time.

@khaeru @volker-krey @danielhuppmann can it be possible to please assign someone responsible for updating the ixmp.jar file in the major releases of ixmp every 3-6 months?

@khaeru
Copy link
Member

khaeru commented Jul 13, 2021

can it be possible to please assign someone responsible for updating the ixmp.jar file in the major releases of ixmp every 3-6 months?

I agree this is critical—whether or not work is planned to build a new backend—but I also have no power to assign anyone.

any glimmer of a resolution for this issue?

Since no one is assigned, there is no progress, sorry.

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
Projects
None yet
Development

No branches or pull requests

2 participants