Back

Relative and absolute imports 

Created 1 year ago
120 Views
1 Comments
akash6762
@akash6762
akash6762
@akash6762Profile is locked. Login

Im working on a this YouTube data api project and this project mainly focuses on scraping the data with the help of YouTube data api and displays the processed data in streamlit app

Here's the folder structure. The name of the top level directory is youtube inside this there's a folder called script , inside scripts there's another two folders called streamlit and youtubeApi. The youtubeApi contains python files which interact with youtube data api and scrapes data. Streamlit folder contains app.py file which is the streamlit file. The problem here is everything is coded in a modular fashion so i need to import the python scripts but i can't import the files from other folders like the files in streamlit folder cannot be imported inside youtubeApi folder. I did everything tried a lot of things, i did both relative and absolute imports nothing seems to be working and i even checked and changed the PYTHONPATH, no luck.

Comments
Please login to comment.