ValueErrors

Hello Everyone,

I just started using Streamlit and I was able to deploy my app yesterday perfectly. The app runs locally without any issue and sends user input to googlesheets. The error occurs whenever I try to deploy and code includes a connection to a googlesheet.

It gives the following error:

β€œValueError: numpy.dtype size changed, may indicate binary incompatibility.
Expected 96 from C header, got 88 from PyObject.”

To solve this issue, I added numpy==1.25.1 (my local numpy version) to the requirements.txt. But now the following error occurs.

ValueError: Spreadsheet must be specified.

Thanks in advance for your help.

Related question:

1 Like

l have the exact same problem as @halilibrahimaysell! I got the error when trying to access a google sheet with streamlit_gsheets.

This code runs perfectly on my local machine,

Based on @Rub_Kha’s link, I tried requiring numpy=1.26.4. I get a different error now that is still more mysterious, but still related to accessing gsheets.

Here is the last bit of error log form the Streamlit cloud app manager:

  /home/adminuser/venv/lib/python3.12/site-packages/streamlit_gsheets/gsheets_  
  connection.py:37 in <module>                                                  
                                                                                
     34 from sql_metadata import Parser                                         
     35 from streamlit.connections import ExperimentalBaseConnection            
     36 from streamlit.runtime.caching import cache_data                        
  ❱  37 from streamlit.type_util import convert_anything_to_df, is_dataframe_c  
     38 from validators.url import url as validate_url                          
     39 from validators.utils import ValidationError                            
     40                                                                         
────────────────────────────────────────────────────────────────────────────────
ImportError: cannot import name 'convert_anything_to_df' from 
'streamlit.type_util' 
(/home/adminuser/venv/lib/python3.12/site-packages/streamlit/type_util.py)
2024-08-14 18:18:06.898 503 GET /script-health-check (127.0.0.1) 184.19ms