'Importing files modulenotfounderror
I have looked on multiple stackoverflow post but cannot find the answer. I have the following file structure i am also doing this in a django project
crypto_api_site
bitvavo_api
bitvavowallet.py
data.py
main
views.py
Where data.py imports bitvavowallet.py and views.py imports data.py .
But when executing python manage.py runserver
I keep getting the error
ModuleNotFoundError: No module named 'bitvavowallet'
my import in views.py looks like this
sys.path.append('crypto_api_site/bitvavo_api/')
from bitvavo_api import data
and my import in data.py looks like this
import bitvavowallet
I also added __init__.py in the directories
Thanks in advance for any help
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
