RAMP-project / RAMP-mobility

A novel application of the RAMP main engine for generating bottom-up stochastic electric vehicles load profiles.
European Union Public License 1.2
24 stars 13 forks source link

AttributeError: 'PeriodIndexResampler' object has no attribute 'pad' I find this error when I run ramp_run.py of ramp mobility and I can't find the solution. Could anyone find or know the solution? #40

Open Simoset opened 4 months ago

Simoset commented 4 months ago

c51024813d30dc0b114022c2e204a20f

Bachibouzouk commented 4 months ago

Hello @Simoset - thank you for your Issue. This repository is about RAMP, the RAMP-mobility repository is under https://github.com/RAMP-project/RAMP-mobility, I will transfer your issue there :)

Some useful information would be your operating system and which version of RAMP-mobility you installed :)

Bachibouzouk commented 4 months ago

@FLomb - I don't have the rights to transfer to RAMP-mobility, would you mind to do it? On the right panel look for "Transfer issue"

Simoset commented 4 months ago

Hello @Simoset - thank you for your Issue. This repository is about RAMP, the RAMP-mobility repository is under https://github.com/RAMP-project/RAMP-mobility, I will transfer your issue there :)

Some useful information would be your operating system and which version of RAMP-mobility you installed :)

My operation system is windows 10, and I run the programm with spyder 5 (Python 3.11)

FLomb commented 4 months ago

Dear @Simoset, thanks for opening this issue. I believe the error is due to a newer version of pandas in which the pad option is deprecated. In our environment.yml, we specify that pandas needs to be >=0.24 so you may have ended up with a version higher than 2.0, starting from which the pad option got deprecated.

Can you check what pandas version you have in your ramp_mobility environment? If I am right, the easy fix to your issue could be either to downgrade pandas (e.g., I have v.1.2.2 in my ramp_mobility environment) or to modify the pad command with ffill, which substituted it.

Here in the repo, we are probably going to fix the issue by updating the environment.yml file to specify a precise version of pandas, instead of something >=0.24.

Simoset commented 4 months ago

Thank you very much, I modified the command pad with ffill and now the programm run. My pandas version is v2.1.4.

FLomb commented 4 months ago

Fantastic, then we'll commit the change to the main repo and fix the issue