CannotSendRequest: Request-sent Deta Database

Hello,

I have an application with database hosted on Deta. When I enter the application for the first time the entire data frame is seen without problems but when I exit (It has a user authentication system) and enter the application again, the data frame no longer appears and I get the following error :

CannotSendRequest: Request-sent

I don’t understand the reason for the problem, if it is due to cache or multithreading issues, the problem is solved when I clear cache and log in again but the error returns once I log out and log in again… Any ideas?

DF_HEADER = [‘key’,‘Fecha’, ‘Nombre Monitorista’, ‘Bitácora’, ‘Cliente’, ‘Motivo de Entrada’, ‘Marca’, ‘Modelo’, ‘Placas’, ‘Economico’, ‘Latitud’, ‘Longitud’, ‘Estado’, ‘Municipio’, ‘Tramo’, ‘Estatus’, ‘Observaciones’]

def fetch_all_ainsurance():
“”“Devuelve un diccionario de todos los registros.”“”
res = db_ainsurance.fetch()
return res.items

st.markdown(“

Edición de Marco de Datos de los Eventos AInsurance

”, unsafe_allow_html=True)
st.write(f"Marco de datos para editar eventos de los servicios (Bitácoras) AInsurance de AI27 registrados con errores o cambios de estatus posteriores.")
elementos = ainsurance_db.fetch_all_ainsurance()
if len(elementos) < 1:
df1 = pd.DataFrame(columns=DF_HEADER)
else:
df1 = pd.DataFrame(elementos)