polca / premise

Coupling Integrated Assessment Models output with Life Cycle Assessment.
BSD 3-Clause "New" or "Revised" License
101 stars 45 forks source link

ValueError: x and y arrays must have at least 2 entries #116

Closed zeeshankhan2 closed 5 months ago

zeeshankhan2 commented 10 months ago

Hi there, I am trying to make new database from default scenarios but i am getting the following error. It worked out perfectly on another computer but on my PC it is giving following error.

image image image

Thanks in anticipation for guidance .

romainsacchi commented 10 months ago

Hi, is it possible to have the full error? (view as scrollable element to see it full).

zeeshankhan2 commented 10 months ago

Hi @romainsacchi thanks for your response. But it was some back end libraries problem within my anaconda which is now working .thanks

romainsacchi commented 9 months ago

Can you elaborate, because some other users have this issue. Was it pandas or xarray?

zeeshankhan2 commented 9 months ago

I just installed new anaconda and all setup ie premise.But now i am getting this error unfortunately.it works on one system but on another it gives error. image

romainsacchi commented 9 months ago

Hi @zeeshankhan2 updating pandas and xarray (to 2023.9.0), as the error indicates, should solve the issue. Let me know.

zeeshankhan2 commented 9 months ago

Updated xarray as below image but still gives the same error.

romainsacchi commented 9 months ago

You can try to update premise to 1.7.2.

zeeshankhan2 commented 9 months ago

Can you please tell me how to update it and how to check its current version?

romainsacchi commented 9 months ago

You can do:

pip install premise==1.7.2

and to check the libraries installed you cna do:

pip list
zeeshankhan2 commented 9 months ago

Got this error while installing 1.7.2 image and it is same version after this

romainsacchi commented 9 months ago

you can also try conda

conda install -c conda-forge premise
zeeshankhan2 commented 9 months ago

Is it normal thats it takes too much time using conda install -c conda-forge premise? image

romainsacchi commented 9 months ago

Yes, sometimes it takes a while. note that I just released 1.7.3 which fixes a bug. The alternative, if you do not need to generate yourself the scenarios, is to use the ScenarioLink plugin fro Activity Browser, to import the premise databases.

zeeshankhan2 commented 9 months ago

Thanks for informing about the nice plugin. I updated the premise to new version and now when i create databases and use ndb.update_electricity() and after thay when i am trying to write it to superstructure database using ndb.write_superstructure_db_to_brightway(), i am getting the following error although it didnot happened previously image

romainsacchi commented 9 months ago

Ah yes, we fixed this issue in 1.7.6 -- sorry about that.

romainsacchi commented 5 months ago

Closing now. Re-open if the issue persists.