I have a project structure like this:
/adapters/adapter.py
/blockchain.py
/venv
#adapter.py
from blockchain import Blockchain
class Adapter():
pass
#blockchain.py
class Blockchain():
pass
contains from blockchain import Blockchain
blockchain.py would is like class Blockchain(): pass
Now from adapter.py I want to import the class Blockchain which is located in blockchain.py
I am using python 3.6.6 (using venv) and I never had any problems doing that until today when I moved some stuff with init files into the project. I deleted all the files and pulled from the repo to make sure its exactly like before when it was working but I am getting
no module named "blockchain"
I don't have any init files in my project and it worked for 2 weeks without a problem which is very strange. I know there are a lot of similar posts already, most of them suggesting to use init files, but I am very confused why it worked before and but anymore.
My sys.path is like this (bcios-master is the root folder):
['', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload', '/Users/timo/Documents/bcio-master/venv/lib/python3.6/site-packages']
Somehow if I try to append it doesn't save it.