Sven-Bo / connect-streamlit-with-google-sheets

16 stars 4 forks source link

Possible dependency problem #1

Open michaelehrig opened 1 year ago

michaelehrig commented 1 year ago

When trying to import GSheetsConnection the ValidationFailure cannot be properly imported:

File "C:\Users\xxxxx\miniconda3\Lib\site-packages\streamlit_gsheets__init__.py", line 15, in from streamlit_gsheets.gsheets_connection import GSheetsConnection # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxxx\miniconda3\Lib\site-packages\streamlit_gsheets\gsheets_connection.py", line 39, in from validators.utils import ValidationFailure

Sven-Bo commented 1 year ago

Have you tried running pip install streamlit git+https://github.com/streamlit/gsheets-connection ? Please also install the packages in a fresh new env

michaelehrig commented 1 year ago

I have both run the pip command as well as tried a new environment. I will try again on a different system with a new conda installation.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: @.> Sent: Monday, 28 August 2023 15:01 To: @.> Cc: @.>; @.> Subject: Re: [Sven-Bo/connect-streamlit-with-google-sheets] Possible dependency problem (Issue #1)

Have you tried running pip install streamlit git+https://github.com/streamlit/gsheets-connection ? Please also install the packages in a fresh new env

— Reply to this email directly, view it on GitHubhttps://github.com/Sven-Bo/connect-streamlit-with-google-sheets/issues/1#issuecomment-1695012242, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMCCRKCZR6LQISCT3XHXMJDXXQQZJANCNFSM6AAAAAA4AVAXWE. You are receiving this because you authored the thread.Message ID: @.***>

DerieRud commented 1 year ago

Hi

I encountered the same problem. It seems that the gsheet_connection.py uses
'from validators.utils import ValidationFailure' however the validator package contains 'ValidationError' instead of ValidationFailure.

A temporary workaround was to manually adapt the gsheets_connection.py code to: from validators.utils import ValidationError

However, I found on https://pypi.org/project/validators/#history that from August 11 there is a new version of Validators. When installing the 0.20.0 version it worked for me.