Got this error: TypeError: Argument 'placement' has incorrect type (expected pandas._libs.internals.BlockPlacement, got slice)

I try to deploy my aps, but find this error:
TypeError: Argument ‘placement’ has incorrect type (expected pandas._libs.internals.BlockPlacement, got slice)

Here is my aps: https://used-car-price-ksa.streamlit.app/
Here is my github: GitHub - Risdan224/Predicting-Used-Car-Price: Project Capstone Modul 3 : Machine Learning

Please help

Hey @Risdan_Kristori,

Thanks for sharing this question. If you aren’t seeing this error locally, this is probably a result of your app using a different version of Pandas when you’ve deployed it on Streamlit Community Cloud – I’d recommend looking at what version of Pandas you’re using locally and then pinning Pandas to that version via your requirements.txt file

Thanks @Caroline , already solved, appreciate your response

1 Like

can i know how you solve it? because i have the same error

I used pandas version 2.1.4 then recreated the model:
!pip install pandas==2.1.4