RAMP-mobility icon indicating copy to clipboard operation
RAMP-mobility copied to clipboard

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?

Open Simoset opened this issue 9 months ago • 6 comments

c51024813d30dc0b114022c2e204a20f

Simoset avatar May 07 '24 16:05 Simoset

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 avatar May 07 '24 16:05 Bachibouzouk

@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"

Bachibouzouk avatar May 07 '24 16:05 Bachibouzouk

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)

Simoset avatar May 07 '24 20:05 Simoset

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.

FLomb avatar May 10 '24 08:05 FLomb

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

Simoset avatar May 13 '24 09:05 Simoset

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

FLomb avatar May 14 '24 08:05 FLomb