Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+4 votes

An error keeps recurring every time I try to input an image, it gives me this error ''TypeError: 'module' object is not callable". What should I do?

asked in CSC201 Spring 2021 by (1 point)

2 Answers

+4 votes

This happens because Python gets confused between class name and module name. If you are importing something with the same name as your class. This goes back to have unique variable names. Try changing your class name and it shall work.

answered by (1 point)

Thank you, It worked

+2 votes

Might be that your class or module name is similar, which make python misunderstood, maybe try more uniquename like write the whole thing out more

answered by (1 point)