snowflakedb/snowflake-cli

SNOW-947055: Import Error When Trying To Run App

Closed this issue · 7 comments

SnowCLI version

1.2.0

Python version

3.9.6

Platform

macOS-13.5.2-arm64-arm-64bit

What happened

I've deployed my app successfully. But when I go to run the app, comes back with a ModuleNotFoundError. In my main application python file, I import a separate python file with my functions. This file sits in the same folder as the main python file.
Screenshot 2023-10-19 at 4 35 03 PM

Console output

(myenv) mashsyed@mashs-mbp car-trends % snow streamlit deploy cars_app --file=Home.py -c mashsf --replace --query-warehouse MED_COMPUTE_WH --debug
Streamlit successfully deployed and available under https://app.snowflake.com/JZUYHUK/fha10802/#/streamlit-apps/ANALYTICS.CARS.CARS_APP

How to reproduce

I'm not sure

Adding another screenshot to show what my local environment looks like
Screenshot 2023-10-19 at 4 38 28 PM

@sfc-gh-turbaszek Can we check on it ?

car_functions.py is not uploaded to Snowflake. That's expected as we currently upload mian file, environment.yml and files from pages/ directory. Additional files are not yet supported.

@mashhype You can add an extra command to upload that file to the associated stage, something like

snow stage put car_functions.py analytics.public.streamlit/cars_app --overwrite -c mashsf

Hi @sfc-gh-turbaszek

How do I find the name of my stage?
I tried that and got this error below:
Screenshot 2023-10-20 at 10 57 31 AM

disregard @sfc-gh-zblackwood, its literally the path to my schema and database! Thank you for your help!

Screenshot 2023-10-20 at 11 08 33 AM

found the path needed to upload the file