Ask coding questions

← Back to all posts
Module Not Found Error
LohBoon

When input >>>from blog,models import Blog
the output show No module named 'blog', why? how to fixed it?

Thank you.

Voters
samrudhswaminat
LohBoon
Comments
hotnewtop
Coder100

You defined your class as blog silly!

Solution

Either rename your class to

or import it differently

Wumi4

Python doesn't allow you to import your file to its shell.