Cant import other files

i am trying to import helper funcs into my main file, but it doesnt seem to work

the file is right next to it in the repo ( henosBot/dashboard (

Hey @henosBot,

So I dont think this would work (even locally) because you have to specify the folder of your file, even though it’s being imported into another file in your website/ directory. (At least this is how I have been able to get all my other scripts working, both locally and on Sharing.)

I mocked up an example, that has the same directory structure as you do:

- <--- my main app file
- modules/  
   -   # first I import this into my an app file
   -  # I import this into which is imported into

Then in the file to import the without any module not found errors use:
import modules.mod_2 as mod

Happy Streamlit-ing!

1 Like

Thanks, it works now

1 Like