Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

session_state - samples/streamlit-in-snowflake/sis-local #25

Open
apd-cmarland opened this issue May 27, 2023 · 0 comments
Open

session_state - samples/streamlit-in-snowflake/sis-local #25

apd-cmarland opened this issue May 27, 2023 · 0 comments

Comments

@apd-cmarland
Copy link

I've found that this becomes problematic when the Snowpark session is in the Streamlit session_state when developing locally. I got around this with the following:

def running_in_sis() -> bool:
try:
sess = get_active_session()
if 'appRoot' in os.getcwd():
return True
else:
return False
except SnowparkSessionException:
return False

@apd-cmarland apd-cmarland changed the title session_state session_state - samples/streamlit-in-snowflake/sis-local May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant