0

This is my code

This is my actual code saved as Cartoonify.py

This is my init.py

#init.py file

from .Cartoonify import Cartoon<br>
__all__= [
    "Cartoon"
]

I am getting this following error:
ModuleNotFoundError:
No module named '__ main __.Cartoonify'; '__main __' is not a package

sharuraut7
  • 7
  • 1
  • 6

1 Answers1

0

If you try to import files from in a package with .something, this error always shows up. Your package needs to be run as package in order to work, so you should get a file outside the package, in which you do:

import <package>

doSomethings()

That should work.