[Answered ]-'module' object is not callable in server runtime but ok in django console

1👍

Check your namespaces…

in pmo_review_task (line 38 is “newtask = sc_review_task()”) it should be newtask=sc_review_task.sc_review_task()

1👍

Looks like the error is that you’re trying to execute sc_review_task instead of sc_review_task.sc_review_task.

To prevent this kind of mistakes, I think you should name your modules using lowercase letters and your classes using uppercase letters, that is, the module should be sc_review_task and the class ScReviewTask.

For more inforation, please have a look at PEP 8:

Package and Module Names

Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.

Class Names

Almost without exception, class names use the CapWords convention. Classes for internal use have a leading underscore in addition.

Leave a comment