celery: ImportError: No module named time - django

Trying to start celery. I get an error.
Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django_celery_beat/models.py", line 19, in <module>
from .clockedschedule import clocked
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django_celery_beat/clockedschedule.py", line 6, in <module>
from celery.utils.time import maybe_make_aware
ImportError: No module named time
I'm use
celery == 3.1.25
django-celery == 3.1.17
django-celery-beat == 1.5.0
Celery versions> 4.0 cannot be used.

According to the changelog, django-celery-beat 1.0.1+ requires Celery 4.0.
You could try django-celery-beat 1.0.0, but if that doesn't work, then you might not be able to use django-celery-beat until you can upgrade to Celery 4.0.

Related

Django Showing errror like "Import Error No module named redis"

#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "queuearoo.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
I am Accesing this from remote server using puTTY and getting the errors like the following
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/devbase/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/devbase/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 308, in execute
settings.INSTALLED_APPS
File "/home/devbase/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/home/devbase/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/home/devbase/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 110, 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/devbase/devbase/queuearoo/queuearoo/settings.py", line 2, in <module>
import os,redis
ImportError: No module named redis
you just need to install redis with this command:
pip install redis
also note that you are using virtual environment so you need to activate it first:
source /home/devbase/env/local/bin/activate

Django Upgrade From 1.8.8 to 1.11.13 Issue

I am getting the following error. I have added the sites framework, allowed the domain and updated the middleware and context processors but cant fathom this error. Any help would be appreciated as this is live at the minute.
manager#web-server:~/Websites/shen$ python manage.py migrate
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 364, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate
app_config.import_models()
File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/dist-packages/easy_thumbnails/models.py", line 6, in <module>
from easy_thumbnails import utils, signal_handlers
File "/usr/local/lib/python2.7/dist-packages/easy_thumbnails/utils.py", line 15, in <module>
from easy_thumbnails.conf import settings
File "/usr/local/lib/python2.7/dist-packages/easy_thumbnails/conf.py", line 334, in <module>
settings = Settings()
File "/usr/local/lib/python2.7/dist-packages/easy_thumbnails/conf.py", line 21, in __init__
super(AppSettings, self).__init__(*args, **kwargs)
TypeError: __init__() takes exactly 2 arguments (1 given)

Geonode Installation Oracle Linux

I am running python 2.7.5 and installing geonode in a Oracle Linux machine. I am following the installation manual and I execute the command:
python manage.py migrate
I got the following error
Traceback (most recent call last):
File "manage.py", line 29, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
File "/usr/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/usr/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/opt/apps/geonode/geonode/geonode/base/models.py", line 56, in <module>
from geonode.utils import bbox_to_wkt
File "/opt/apps/geonode/geonode/geonode/utils.py", line 31, in <module>
from slugify import Slugify
File "/usr/lib/python2.7/site-packages/slugify/__init__.py", line 1, in <module>
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
Any tip on how to solve this issue?
Thank you for your time in advance
This issue is solved in awesome-slugify 1.6.5 just change its version in geonode/requirements.txt.
N.B: geonode 2.8 is released and the link you follow is not up to date, follow this to get geonode 2.8

ImportError: No module named django: Python 2.7.5

I am having a problem with the project which shows the following errors. This was the project which used to run a year ago but when i tried to run now in the same python version(2.7.5) but shows error. Can anyone help me to solve this error.
C:\Users\ss\Desktop\project_ss\src>python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\core\management__init__.py", line 338, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\core\management__init__.py", line 312, in execute
django.setup()
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\apps\registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\apps\config.py", line 119, in create
import_module(entry)
File "C:\Python27\lib\importlib__init__.py", line 37, in import_module
import(name)
ImportError: No module named django

Django Error - ImportError: cannot import name get_cache

I was running my project using Django 1.8 and it was working properly. But then I had to upgrade Django to 1.9 now when I again run my project it gave an error - ImportError: cannot import name get_cache.
python manage.py syncdb
and I get following:
Traceback (most recent call last):
File "manage.py", line 10, in <module> execute_from_command_line(sys.argv)
File "/home/vermahim17/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 350,
in execute_from_command_line utility.execute()
File "/home/vermahim17/env/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 324, in execute django.setup()
File "/home/vermahim17/env/local/lib/python2.7/site-packages/django/__init__.py",
line 18, in setup apps.populate(settings.INSTALLED_APPS)
File "/home/vermahim17/env/local/lib/python2.7/site-packages/django/apps/registry.py",
line 85, in populate app_config = AppConfig.create(entry)
File "/home/vermahim17/env/local/lib/python2.7/site-packages/django/apps/config.py",
line 90, in create module = import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py",
line 37, in import_module __import__(name)
File "/home/vermahim17/env/local/lib/python2.7/site-packages/keyedcache/__init__.py",
line 27, in <module>
from django.core.cache import get_cache, InvalidCacheBackendError, DEFAULT_CACHE_ALIAS ImportError: cannot import name get_cache
I think , Django 1.9 doesn't have the provision to import get_cache method. Please look into this to fix
https://github.com/vstoykov/django-imagekit/commit/c26f8a0