Package utils doesn't have gui module

Summary

Package utils doesn’t have gui module
(https://github.com/streamlit/snowflake-usage-app/blob/main/pages/01_🔹_Compute_insights.py)
from utils import charts, gui, processing

Where I can get the gui module used from utils pacakge

Thanks!

Hi @Velu_NatSF,

Thanks for posting!

It’s imported from the utils folder as shown below:

Hi Tony,

Thanks for the screenshot reference. The utils package issue is resolved.
Now the program fails in ‘charts.py’ reference to:

code snipped:

@st.experimental_memo(ttl=60 * 60 * 12)
def get_bar_chart(
df: pd.DataFrame,
date_column: str,
value_column: str,
color: str = gui.BLUE_COLOR,
) → alt.vegalite.v4.api.Chart:

Error Message:

AttributeError: module ‘altair.vegalite’ has no attribute ‘v4’
Traceback:


File "C:\Users\velun\anaconda3\envs\snowusage\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
    exec(code, module.__dict__)
File "C:\VeluN-SF\streamlit-app\streamlit-usage\pages\03_🔹_Data_Transfer_insights.py", line 9, in <module>
    from utilsn import charts, gui, processing
File "C:\VeluN-SF\streamlit-app\streamlit-usage\utilsn\charts.py", line 24, in <module>
    ) -> alt.vegalite.v4.api.Chart:

Appreciate your help to address this issue.

Best Regards,
Velu N

Please search the forum for that error message and you will see this has been asked repeatedly

Several of these suggest a solution like this ModuleNotFoundError: No module named 'altair.vegalite.v4' - #6 by Franky1

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.