amplab / ampcrowd

A RESTful web service that runs microtasks across multiple crowds, provides quality control techniques, and is easily extensible.
https://amplab.github.io/ampcrowd
Apache License 2.0
51 stars 18 forks source link

Docker-compose - could not import settings 'crowd_server.settings' #15

Open ghost opened 8 years ago

ghost commented 8 years ago

I tried using docker-compose to deploy an AMPCrowd instance on EC2.

Things look good up to the point that docker starts to call manage.py. I did create a private_settings.py file using my AMT credentials.

Here is the output up at the point mange.py is called.

db_1 | LOG: database system was shut down at 2016-11-03 21:22:36 UTC db_1 | LOG: MultiXact member wraparound protections are now enabled db_1 | LOG: database system is ready to accept connections db_1 | LOG: autovacuum launcher started web_1 | Traceback (most recent call last): web_1 | File "ampcrowd/manage.py", line 10, in web_1 | execute_from_command_line(sys.argv) web_1 | File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 385, in execute_from_command_line web_1 | utility.execute() web_1 | File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 345, in execute web_1 | settings.INSTALLED_APPS web_1 | File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 46, in getattr web_1 | self._setup(name) web_1 | File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 42, in _setup web_1 | self._wrapped = Settings(settings_module) web_1 | File "/usr/local/lib/python2.7/site-packages/django/conf/init.py", line 98, in init web_1 | % (self.SETTINGS_MODULE, e) web_1 | ImportError: Could not import settings 'crowd_server.settings' (Is it on sys.path? Is there an import error in the settings file?): cannot import name _uuid_generate_random

thisisdhaas commented 8 years ago

The error message suggests that the problem comes when trying to import the uuid module.

Some quick googling turned up this thread. Are you running python 2.7.11? If so, the patch suggested here might fix it--maybe place it in ampcrowd/crowd_server/settings.py?

If that works, it would be great to contribute the patch to the codebase as a pull request.