Package utils doesn't have gui module


Package utils doesn’t have gui module
from utils import charts, gui, processing

Where I can get the gui module used from utils pacakge


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 ‘’ 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’

File "C:\Users\velun\anaconda3\envs\snowusage\lib\site-packages\streamlit\runtime\scriptrunner\", line 552, in _run_script
    exec(code, module.__dict__)
File "C:\VeluN-SF\streamlit-app\streamlit-usage\pages\03_🔹", line 9, in <module>
    from utilsn import charts, gui, processing
File "C:\VeluN-SF\streamlit-app\streamlit-usage\utilsn\", 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