Skip to content
This repository has been archived by the owner on Sep 18, 2018. It is now read-only.

Cannot run ./manage.py syncdb #405

Open
csakoda opened this issue Oct 23, 2015 · 21 comments
Open

Cannot run ./manage.py syncdb #405

csakoda opened this issue Oct 23, 2015 · 21 comments

Comments

@csakoda
Copy link

csakoda commented Oct 23, 2015

I got the service up, but cannot login as there's no users. Trying to get demosetup run produces the following errors

root@551f0b5b9197:/srv/rattic# ./manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 415, in handle
    return self.handle_noargs(**options)
  File "/usr/local/lib/python2.7/dist-packages/south/management/commands/syncdb.py", line 68, in handle_noargs
    migrations = migration.Migrations(app_label)
  File "/usr/local/lib/python2.7/dist-packages/south/migration/base.py", line 64, in __call__
    self.instances[app_label] = super(MigrationsMetaclass, self).__call__(app_label_to_app_module(app_label), **kwds)
  File "/usr/local/lib/python2.7/dist-packages/south/migration/base.py", line 90, in __init__
    self.set_application(application, force_creation, verbose_creation)
  File "/usr/local/lib/python2.7/dist-packages/south/migration/base.py", line 154, in set_application
    module = importlib.import_module(self.migrations_module())
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/django/migrations/__init__.py", line 16, in <module>
    raise ImproperlyConfigured(SOUTH_ERROR_MESSAGE)
django.core.exceptions.ImproperlyConfigured:
For South support, customize the SOUTH_MIGRATION_MODULES setting
to point to the correct migrations module:

    SOUTH_MIGRATION_MODULES = {
        'kombu_transport_django': 'kombu.transport.django.south_migrations',
    }
@n0xt3R
Copy link

n0xt3R commented Oct 24, 2015

has anyone resolved this? I am running on the same issues. Not sure if downloading an older version of Rattic and extracting only that manage.py and running it would help. Maybe the newer version is using something else that is not there. I am at a lost. New to python and django. Really need this system up.

@csakoda
Copy link
Author

csakoda commented Oct 24, 2015

@n0xt3R See the pull request for a resolution: #406

The maintainer mentioned they might have time to merge it to master this weekend if you want to wait.

@n0xt3R
Copy link

n0xt3R commented Oct 24, 2015

That would be awsome. Yes I'll wait. I did some changes manually. Deleted
the migration folder on python and django then moved over the south
migration renaming it to the same. It migrated with no errors but upon
login it throws an exception that didnt migrate properly
On Oct 23, 2015 6:04 PM, "csakoda" notifications@github.com wrote:

@n0xt3R https://github.com/n0xt3R See the pull request for a
resolution: #406 #406

The maintainer mentioned he might have time to merge it to master this
weekend if you want to wait.


Reply to this email directly or view it on GitHub
#405 (comment)
.

@n0xt3R
Copy link

n0xt3R commented Oct 24, 2015

This is what I did.

cd /usr/local/lib/python2.7/dist-packages # this path probably varies from
system to system
rm -rf kombu/transport/django/migrations djcelery/migrations
mv kombu/transport/django/south_migrations kombu/transport/django/migrations
mv djcelery/south_migrations djcelery/migrations
On Oct 23, 2015 8:06 PM, "Leonardo Cunil" nok.bvdc@gmail.com wrote:

That would be awsome. Yes I'll wait. I did some changes manually. Deleted
the migration folder on python and django then moved over the south
migration renaming it to the same. It migrated with no errors but upon
login it throws an exception that didnt migrate properly
On Oct 23, 2015 6:04 PM, "csakoda" notifications@github.com wrote:

@n0xt3R https://github.com/n0xt3R See the pull request for a
resolution: #406 #406

The maintainer mentioned he might have time to merge it to master this
weekend if you want to wait.


Reply to this email directly or view it on GitHub
#405 (comment)
.

@mcgambles
Copy link

I had the same issue. I made the changes suggested here:

csakoda@6758574

and then run pip install -r requirements-base.txt
then re run ./manage.py scripts
./manage.py syncdb --noinput
./manage.py migrate --all
./manage.py collectstatic -c --noinput
./manage.py demosetup

@karnold
Copy link

karnold commented Dec 1, 2015

The commit in @mcgambles comment also allowed me to get rattic installed

@csayre
Copy link

csayre commented Dec 2, 2015

Same for me @mcgambles

@eugeniogigante
Copy link

Hi all,
I have same the problem, there is someone that have fixed it?
Thanks.

@csakoda
Copy link
Author

csakoda commented Dec 22, 2015

@eugeniogigante You can use this repo which resolves the issue https://github.com/csakoda/RatticWeb

@eugeniogigante
Copy link

same problem see the attach
capture
capture

Thanks a lot for your support.
Eugenio

@jeremyrp
Copy link

@eugeniogigante It looks like you're missing python modules. The error is stating it can't find the social_auth module, and looking through your module list it looks like you're at least missing the last two modules from the requirements-base.txt: django-social-auth and paramiko.

Did you try re-running pip install -r requirements-mysql.txt -r requirements-dev.txt after pulling the revisions?

@eugeniogigante
Copy link

Hi,
I solved my issue with your suggest.
Thanks a lot.

@andrewm659
Copy link

Has this been updated and pushed to the main repo? I'm having the same problem and have been for quite some time. I got this working once on CentOS 7.0. Should I still pull the forked release?

@carlosgzze
Copy link

Thanks it was very helpful

@analia
Copy link

analia commented Mar 14, 2016

This has been really useful. Thanks a lot!

@n0xt3R
Copy link

n0xt3R commented Mar 19, 2016

Thanks all!

On Mon, Mar 14, 2016 at 10:42 AM, analia notifications@github.com wrote:

This has been really useful. Thanks a lot!


Reply to this email directly or view it on GitHub
#405 (comment)
.

@oconnortj
Copy link

@csakoda, I tried using your repository but I get the following when I attempt to run ./manage.py syncdb --noinput

Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/apps/RatticWeb/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/opt/apps/RatticWeb/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/apps/RatticWeb/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/opt/apps/RatticWeb/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 75, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/opt/apps/RatticWeb/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/opt/apps/RatticWeb/venv/lib/python2.7/site-packages/south/management/commands/__init__.py", line 10, in <module>
    import django.template.loaders.app_directories
  File "/opt/apps/RatticWeb/venv/lib/python2.7/site-packages/django/template/loaders/app_directories.py", line 25, in <module>
    raise ImproperlyConfigured('ImportError %s: %s' % (app, e.args[0]))
django.core.exceptions.ImproperlyConfigured: ImportError kombu.transport.django: cannot import name _uuid_generate_random

I'm still investigating but I just wanted to check to see if you had any ideas. Also, just to note, I'm doing this on CentOS 6.7.

Thanks

@ogilvieg
Copy link

ogilvieg commented Apr 27, 2016

The commit in @mcgambles comment also allowed me to get rattic installed. On a Centos 7 VM. So basically updating the requirements-base.txt file.

@jwmarshall
Copy link

Seems like the fix has been tested by a number of people in this thread. Why has it not been reviewed and merged by the owners? The original bug is like 6 months old, even the automated builds are failing with the same error.

This was referenced May 12, 2016
@dooblem
Copy link

dooblem commented Oct 27, 2016

Exact same error as @oconnortj , trying the fixes... under Ubuntu 16.04

@cwinl
Copy link

cwinl commented Feb 19, 2017

@oconnortj
i got the same error.
i solved by adding this to manage.py :

import uuid
uuid._uuid_generate_random = None

also see this:
http://stackoverflow.com/questions/34198538/cannot-import-name-uuid-generate-random-in-heroku-django

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests