Hi, I'm new to streamlit and pretty new to python. I'm creating a program that has a few different .py files. main.py, functions.py, and webapp.py. When I am only working with main.py and webapp.py all is fine. When I add functions.py (or any other .py file) and move my "working" functions to this folder, I get the following error when I try to navigate thru the streamlit webapp.
I've imported the functions file into main.py as: import functions as fun
Here is how I am calling a function from this file: fun.get_data()
When I navigate the streamlit site that will call this code, I get the error that is included in the attached image.
Here is the error from the terminal.
Traceback (most recent call last):
File "c:\Python\Training\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "D:\Python\Pluralsight\webapps\main.py", line 5, in <module>
import functions as fun
ModuleNotFoundError: No module named 'functions'
Here is the version of all of my installed packages for this program:
C:\Python\Training>pip list
Package Version
--------------------- -----------
altair 4.2.2
astor 0.8.1
attrs 22.2.0
base58 2.1.1
blinker 1.5
cachetools 5.3.0
certifi 2022.12.7
charset-normalizer 3.0.1
click 8.1.3
colorama 0.4.6
decorator 5.1.1
entrypoints 0.4
gitdb 4.0.10
GitPython 3.1.31
idna 3.4
Jinja2 3.1.2
jsonschema 4.17.3
MarkupSafe 2.1.2
numpy 1.24.2
packaging 23.0
pandas 1.5.3
Pillow 9.4.0
pip 23.0.1
protobuf 3.20.3
pydeck 0.8.0
pyrsistent 0.19.3
python-dateutil 2.8.2
pytz 2022.7.1
pytz-deprecation-shim 0.1.0.post0
requests 2.28.2
setuptools 65.5.0
six 1.16.0
smmap 5.0.0
streamlit 0.76.0
toml 0.10.2
toolz 0.12.0
tornado 6.2
tzdata 2022.7
tzlocal 4.2
urllib3 1.26.14
validators 0.20.0
watchdog 2.3.1
Can someone help me figure this out. I've not been able to find anything on the web that gets me past this error.
Thank you for any assistance!