Attribute Error when loading AgGrid:iteritems

Link to app: https://nba-player-similarity.streamlit.app/

When I first deployed, I had no trouble with this error for at least a few months. However, I recently noticed none of the AgGrid tables are displaying due to the following error:

Attribute Error: ‘Series’ object has no attribute ‘iteritems’.

When I run the app locally, the error does not occur and the app functions as expected. I checked the dependencies on GitHub to my current environment, and they match exactly.

The line that raises the issue is calling AgGrid (shown below). I am not using iteritems in my code.

AgGrid(stats_player1[list("Pic".split(" "))+list("Player".split(" "))+all_stats]

I tried updating the dependency of streamlit-aggrid to 0.3.4 instead of 0.3.3, and the Attribute Error disappeared, but I got this error message on the webpage instead:

This is how the tables for one of the pages appears when it is working correctly:

Hi @joshp

It seems to be due to Pandas 2.0 removing the deprecated iteritems

Could you see if using a different Pandas version would help to resolve this issue.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.