Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7441323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:59:32+00:00 2026-05-29T10:59:32+00:00

When I do ./manage.py process_email in my app, I get ImportError: No module named

  • 0

When I do ./manage.py process_email in my app, I get ImportError: No module named commands.process_email.

My directory layout is:

./
├── __init__.py
├── admin.py
├── forms.py
├── management
│   ├── __init__.py
│   └── commands
│       ├── __init.py__
│       └── process_email.py
├── models.py
├── views.py

The source of the process_email command is:

from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from website.event.models import Event

class Command(BaseCommand):

    def handle(self, *args, **options):
        process_email()

def process_email():
    print "processing email" 

and the error I’m getting:

(website.com)kings@bob-kings-MacBook ~/code/website.com/website $  > ./manage.py  process_email
Traceback (most recent call last):
  File "./manage.py", line 14, in <module>
    execute_manager(settings)
  File "/Users/kings/code/website.com/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/Users/kings/code/website.com/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/kings/code/website.com/lib/python2.6/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/Users/kings/code/website.com/lib/python2.6/site-packages/django/core/management/__init__.py", line 67, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/Users/kings/code/website.com/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
ImportError: No module named commands.process_email 

when I do ./manage.py, it does show process_email in the “Available subcommands:”. This tells me that process_email.py is seen by manage.py. Also init.py is empty (I do not think it matters but just FYI).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:59:33+00:00Added an answer on May 29, 2026 at 10:59 am

    Is __init.py__ named correctly? I am not sure if that’s a typo in your tree, or actually named like that.

    Python treats directories containing __init__.py as modules – however, if that file does not exist it will not process that directory – so it won’t process __init.py__ or that “module”. It is perfectly ok for that file to be blank – however, if it isn’t you can import from it too (django does this a lot) and you can define what gets exported from the module too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How would you manage the lifecycle and automated build process when some of the
We're using CruiseControl.NET to manage our builds and we're in the process of obtaining
I'm write a Android App which based LAMP. There is a login function in
In one of the sites I manage, the client has decided to take on
how to manage a process php file?? i want every form which connected to
A client wants to have a simple intranet application to manage his process. He
I'm looking to modernize our somewhat archaic process of receiving forms and entering them
I have recently created a version control page from my application to manage the
After I submit my app via archive , I test in my iphone and
I have a .NET 4 app running on Windows Server 2008 R2 which I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.