Reputation: 1
I just started coding in python and I encountered some errors. My text editor (vscode)
doesn't show any error while importing the module but whenever I run the code I have encountered it.
So basically, my directory tree looks like this
lib/
|
|-- core/
| |-- module.py
| |-- __init__.py
|
|
|-- python/
|-- server.py
|-- worker.py
|-- __init__.py
When I import module.py
from python/server.py
and use
import lib.core.module
I got an error: No module name lib.core
. I tried adding "." but it doesn't work
Upvotes: 0
Views: 118