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\django_manage.py", line 19, in <module>

    run_module(manage_file, None, '__main__')

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

    fname, loader, pkg_name)

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

    exec code in run_globals

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

    execute_manager(settings)

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

    utility.execute()

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

    self.fetch_command(subcommand).run_from_argv(self.argv)

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

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

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

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

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

    return self.handle_noargs(**options)

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

    emit_post_sync_signal(created_models, verbosity, interactive, db)

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

    interactive=interactive, db=db)

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

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

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

    call_command("createsuperuser", interactive=True)

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

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

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

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

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

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

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

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

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

    user.save(using=self._db)

  File "C:\Python26\Lib\site-packages\django\db\models\base.py", 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\base.py", line 566, in save_base

    created=(not record_exists), raw=raw)

  File "C:\Python26\Lib\site-packages\django\dispatch\dispatcher.py", 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\signals.py", 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\permissions.py", 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\__init__.py", line 12, in <module>

    plugin_pool.plugin_pool.discover_plugins()

  File "C:\Python26\lib\site-packages\django_cms-2.0.2-py2.6.egg\cms\plugin_pool.py", 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 manage.py 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:

+business_cms

  -cms <app>

    +<cms related apps>

  +form_designer <app>

  +menus <app>

  +mptt <app>

  +publisher <app>

  +media <resources>

  +templates

  settings.py

  urls.py

  manage.py

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

1 comment

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!

0

Please sign in to leave a comment.