evewspace / eve-wspace

Wormhole mapping and corporation management for Eve Online.
Apache License 2.0
86 stars 51 forks source link

ImportError: cannot import name _uuid_generate_random #260

Closed EvilGrinUK closed 7 years ago

EvilGrinUK commented 7 years ago

I'm setting up an AWS EC2 Ubuntu 16.04 instance of wspace. I have followed the Ubuntu + MySQL +Nginx install instructions up to the point of initialising the wspace database. However when I attempt to run:

./manage.py syncdb --all --noinput

I get the following stack trace:

Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/maptool/eve-wspace/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/home/maptool/eve-wspace/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 303, in execute
    settings.INSTALLED_APPS
  File "/home/maptool/eve-wspace/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
    self._setup(name)
  File "/home/maptool/eve-wspace/local/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/maptool/eve-wspace/local/lib/python2.7/site-packages/django/conf/__init__.py", line 92, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/maptool/eve-wspace/evewspace/evewspace/settings.py", line 11, in <module>
    import djcelery
  File "/home/maptool/eve-wspace/local/lib/python2.7/site-packages/djcelery/__init__.py", line 22, in <module>
    from celery import current_app as celery  # noqa
  File "/home/maptool/eve-wspace/local/lib/python2.7/site-packages/celery/__init__.py", line 130, in <module>
    from celery import five
  File "/home/maptool/eve-wspace/local/lib/python2.7/site-packages/celery/five.py", line 149, in <module>
    from kombu.utils.compat import OrderedDict  # noqa
  File "/home/maptool/eve-wspace/local/lib/python2.7/site-packages/kombu/utils/__init__.py", line 19, in <module>
    from uuid import UUID, uuid4 as _uuid4, _uuid_generate_random
ImportError: cannot import name _uuid_generate_random
EvilGrinUK commented 7 years ago

Turns out _uuid_generate_random was removed in Python 2.7.11

https://hg.python.org/releases/2.7.11/rev/24bdc4940e81

Maarten28 commented 7 years ago

The issue is coming from Kombu. Due to this I've revised the list of requirements-mysql.txt and suggest to update the following:

Django==1.8.15
PyYAML==3.12
amqp==1.4.9
billiard==3.3.0.23
celery==3.1.23
decorator==4.0.10
django-celery==3.1.17
feedparser==5.2.1
kombu==3.0.33
networkx==1.11
python-dateutil==2.6
python-memcached==1.58
pytz==2016.10
requests==2.12.4
six==1.10.0

This way the whole project is at the latest version of these packages which do not cause immediate issues. I ran the server and a celery worker to confirm this.

Maarten28 commented 7 years ago

I just updated the requirements, which resolve this issue.