Can not create Django super user

I am importing an existing Django app into PyCharm that is using django-cms and am running into a few issues.

When I try to syncdb it installs all the tables fine but when creating the super user I get this stacktrace:

Traceback (most recent call last):

  File "C:\Program Files (x86)\JetBrains\PyCharm 1.1.1\helpers\pycharm\", line 19, in <module>

    run_module(manage_file, None, '__main__')

  File "C:\Python26\lib\", line 140, in run_module

    fname, loader, pkg_name)

  File "C:\Python26\lib\", line 34, in _run_code

    exec code in run_globals

  File "C:\Users\S.E. Todd\PycharmProjects\aspen_law_group_cms\", line 11, in <module>


  File "C:\Python26\Lib\site-packages\django\core\management\", line 438, in execute_manager


  File "C:\Python26\Lib\site-packages\django\core\management\", line 379, in execute


  File "C:\Python26\Lib\site-packages\django\core\management\", line 191, in run_from_argv

    self.execute(*args, **options.__dict__)

  File "C:\Python26\Lib\site-packages\django\core\management\", line 220, in execute

    output = self.handle(*args, **options)

  File "C:\Python26\Lib\site-packages\django\core\management\", line 351, in handle

    return self.handle_noargs(**options)

  File "C:\Python26\Lib\site-packages\django\core\management\commands\", line 105, in handle_noargs

    emit_post_sync_signal(created_models, verbosity, interactive, db)

  File "C:\Python26\Lib\site-packages\django\core\management\", line 182, in emit_post_sync_signal

    interactive=interactive, db=db)

  File "C:\Python26\Lib\site-packages\django\dispatch\", line 172, in send

    response = receiver(signal=self, sender=sender, **named)

  File "C:\Python26\Lib\site-packages\django\contrib\auth\management\", line 44, in create_superuser

    call_command("createsuperuser", interactive=True)

  File "C:\Python26\Lib\site-packages\django\core\management\", line 166, in call_command

    return klass.execute(*args, **defaults)

  File "C:\Python26\Lib\site-packages\django\core\management\", line 220, in execute

    output = self.handle(*args, **options)

  File "C:\Python26\Lib\site-packages\django\contrib\auth\management\commands\", line 133, in handle

    User.objects.create_superuser(username, email, password)

  File "C:\Python26\Lib\site-packages\django\contrib\auth\", line 129, in create_superuser

    u = self.create_user(username, email, password)

  File "C:\Python26\Lib\site-packages\django\contrib\auth\", line 125, in create_user

  File "C:\Python26\Lib\site-packages\django\db\models\", line 456, in save

    self.save_base(using=using, force_insert=force_insert, force_update=force_update)

  File "C:\Python26\Lib\site-packages\django\db\models\", line 566, in save_base

    created=(not record_exists), raw=raw)

  File "C:\Python26\Lib\site-packages\django\dispatch\", line 172, in send

    response = receiver(signal=self, sender=sender, **named)

  File "C:\Python26\lib\site-packages\django_cms-2.0.2-py2.6.egg\cms\", line 127, in post_save_user

    from cms.utils.permissions import get_current_user

  File "C:\Python26\lib\site-packages\django_cms-2.0.2-py2.6.egg\cms\utils\", line 5, in <module>

    from cms.models import Page, PagePermission, GlobalPagePermission

  File "C:\Python26\lib\site-packages\django_cms-2.0.2-py2.6.egg\cms\models\", line 12, in <module>


  File "C:\Python26\lib\site-packages\django_cms-2.0.2-py2.6.egg\cms\", line 15, in discover_plugins

    __import__(app, {}, {}, ['cms_plugins'])

ImportError: No module named inherit

Process finished with exit code 1

Also, when running sql task from the IDE only shows some apps available to run the command on with lots of blank entries as well. Is this normal?

I am running pycharm on Windows Vista and my project tree is as follows:


  -cms <app>

    +<cms related apps>

  +form_designer <app>

  +menus <app>

  +mptt <app>

  +publisher <app>

  +media <resources>


Has anyone had success using PyCharm to manage a django-cms application?

1 comment
Comment actions Permalink

I actually resolved this issue myself and I found an interesting issue.

It was trying to load modules from an old django-cms egg in my python site-packages folder.

I tried to remove it from my python interpreter in the project settings and it had (removed by user) next to it so I thought for sure it wouldn't use that path anymore and instead use the cms module in my project but that wasn't the case. I had to go in and manually delete the django-cms egg file from my site-package folder.

Works well now!


Please sign in to leave a comment.