I'm working in a Python 3 project using Pycharm and I have a problem importing a file. This is my project structure:
twixer |----- docs |----- twixer |----- __init__.py |----- config.ini |----- facepp.py |----- twixer.py |----- setup.py In twixer.py I have the next line:
import twixer.facepp But that line throws this error when I run the project:
Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 2218, in _find_and_load_unlocked AttributeError: 'module' object has no attribute '__path__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:/Users/David/PycharmProjects/twixer-py/twixer/twixer.py", line 2, in <module> import twixer.facepp File "D:\Users\David\PycharmProjects\twixer-py\twixer\twixer.py", line 2, in <module> import twixer.facepp ImportError: No module named 'twixer.facepp'; 'twixer' is not a package I have no idea about how to solve this problem. I tried to change the way I import the file without luck. What is the problem? How can I fix it?
import faceappdo the job ?