Django Upgrade From 1.8.8 to 1.11.13 Issue - django

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)

Related

pkg_resources.DistributionNotFound: Django==1.8.3 in Django 1.9

I use Django 1.9 after updating of Django 1.8, and when i type command
django-admin runserver
I got this one error:
Traceback (most recent call last):
File "/usr/local/bin/django-admin", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 446, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Django==1.8.3
And then I try to type this one command:
django-admin.py runserver
I got this one error:
Traceback (most recent call last):
File "/usr/local/bin/django-admin.py", line 5, in <module>
management.execute_from_command_line()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 195, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 39, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 16, in <module>
from django.db.migrations.executor import MigrationExecutor
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 7, in <module>
from .loader import MigrationLoader
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 10, in <module>
from django.db.migrations.recorder import MigrationRecorder
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 12, in <module>
class MigrationRecorder(object):
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 26, in MigrationRecorder
class Migration(models.Model):
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 27, in Migration
app = models.CharField(max_length=255)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/__init__.py", line 1072, in __init__
super(CharField, self).__init__(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/__init__.py", line 166, in __init__
self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 41, in _setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
I try uninstall and install Django. But i still have this errors. Hope somebody can help me with it. Thanks
You shouldn't normally use django-admin, except when you do django-admin startproject.
After you have created the project, it is easier to use manage.py to run the dev server, because it takes care of setting the path and settings module for you.
./manage.py runserver
See the docs for more information.
Maybe you used another python version? It is python 2.7 now, and it seems you don't installed django properly for python2.7. You can try
python3 manage.py runserver
for using python3 in ubuntu (it is installed by default and accessibler with python3), or try to define how to run it with another python version.

migrate failure (django 1.8)

I'm trying in vain to migrate my database to the server. here is the traceback that I get from the terminal.
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv) File "/home/guimatsi/webapps/nnmland/lib/python2.7/Django-1.8.6-py2.7.egg/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute() File "/home/guimatsi/webapps/nnmland/lib/python2.7/Django-1.8.6-py2.7.egg/django/core/management/__init__.py", line 328, in execute
django.setup() File "/home/guimatsi/webapps/nnmland/lib/python2.7/Django-1.8.6-py2.7.egg/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS) File "/home/guimatsi/webapps/nnmland/lib/python2.7/Django-1.8.6-py2.7.egg/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models) File "/home/guimatsi/webapps/nnmland/lib/python2.7/Django-1.8.6-py2.7.egg/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 "/home/guimatsi/lib/python2.7/registration/models.py", line 15, in <module>
User = get_user_model() File "/home/guimatsi/webapps/nnmland/lib/python2.7/Django-1.8.6-py2.7.egg/django/contrib/auth/__init__.py", line 150, in get_user_model
return django_apps.get_model(settings.AUTH_USER_MODEL) File "/home/guimatsi/webapps/nnmland/lib/python2.7/Django-1.8.6-py2.7.egg/django/apps/registry.py", line 199, in get_model
self.check_models_ready() File "/home/guimatsi/webapps/nnmland/lib/python2.7/Django-1.8.6-py2.7.egg/django/apps/registry.py", line 131, in check_models_ready
raise AppRegistryNotReady("Models aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
Since I'm new in django and it's my first project, Every hint would be appreciated. ths in advance.
It looks like you might be using a version of Django registration that does not support Django 1.8. You could try installing Django registration redux instead.

Why getting this error when I'm creating new app in my django project Using command "python manage.py startapp authsss"

Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/apps/config.py", line 87, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named auth
There is Import Error there is No module name auth which you imported somewhere in you project.
in your trace-back it is mentioned at last :
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/apps/config.py", line 87, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named auth
Last line :
ImportError: No module named auth
Actually i got this error when i'm creating a custom login page in django project.. suppose you created a app that call auth but due some reason you deleted this app from your project but not uninstall ('auth',)from project setting.py.
so if in future you get error like this then it is one of among problem that remove 'auth', also from project setting.py

django unable to start runserver

unable to start C:\Python27\mysastha>python manage.py runserver
c:\python27\lib\site-packages\djangotoolbox-1.6.2-py2.7.egg\djangotoolbox\db\uti
ls.py:5: RemovedInDjango19Warning: django.utils.unittest will be removed in Djan
go 1.9.
from django.utils.unittest import skip
Traceback (most recent call last):
File "manage.py", line 17, in <module>
execute_from_command_line(sys.argv)
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\core\managemen
t\__init__.py", line 330, in execute_from_command_line
utility.execute()
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\core\managemen
t\__init__.py", line 304, in execute
django.setup()
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\__init__.py",
line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\apps\registry.
py", line 108, in populate
app_config.import_models(all_models)
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\apps\config.py
", line 197, in import_models
self.models_module = import_module(models_module_name)
File "c:\python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\contrib\auth\m
odels.py", line 40, in <module>
class Permission(models.Model):
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\models\base
.py", line 127, in __new__
new_class.add_to_class('_meta', Options(meta, **kwargs))
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\models\base
.py", line 303, in add_to_class
value.contribute_to_class(cls, name)
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\models\opti
ons.py", line 166, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length(
))
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\__init__.py
", line 36, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\utils.py",
line 238, in __getitem__
backend = load_backend(db['ENGINE'])
File "c:\python27\lib\site-packages\django-1.8-py2.7.egg\django\db\utils.py",
line 127, in load_backend
raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: 'django_mongodb_engine' isn't an av
ailable database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
u'django_mongodb_engine', u'mysql', u'oracle', u'postgresql_psycopg2', u'sql
ite3'
Error was: cannot import name decimal_to_string
Just follow the instructions in the trace back. you need django.db.backends.django_mongodb_engine as the engine. Not just django_mongodb_engine.
If you havent already you will probably need a couple dependencies for the engine to work. im on mobile and dont know what they are called at the moment for mongodb

Installing django-blog-zinnia

I am going through the docs of http://django-blog-zinnia.com/documentation/getting-started/install/
and when I syncdb I get this error, tagging is in my installed apps, can someone help me?
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/core/management/base.py", line 231, in execute
self.validate()
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/core/management/base.py", line 266, in validate
num_errors = get_validation_errors(s, app)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/core/management/validation.py", line 30, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/db/models/loading.py", line 158, in get_app_errors
self._populate()
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/db/models/loading.py", line 67, in _populate
self.load_app(app_name)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/db/models/loading.py", line 88, in load_app
models = import_module('.models', app_name)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/django_blog_zinnia-0.12.dev-py2.7.egg/zinnia/models/__init__.py", line 5, in <module>
from zinnia.models.entry import Entry
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/django_blog_zinnia-0.12.dev-py2.7.egg/zinnia/models/entry.py", line 22, in <module>
from tagging.fields import TagField
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/tagging-0.2.1-py2.7.egg/tagging/fields.py", line 10, in <module>
from tagging.models import Tag
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/tagging-0.2.1-py2.7.egg/tagging/models.py", line 9, in <module>
from tagging.managers import TagManager, TaggedItemManager
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/tagging-0.2.1-py2.7.egg/tagging/managers.py", line 6, in <module>
from django.db.models.query import QuerySet, parse_lookup
ImportError: cannot import name parse_lookup
You seem to be using an old version of django-tagging (your issue is discussed here!) which itself depends on an old version of Django.
Upgrade django-tagging to the latest version; 0.3.1 seems to be the latest release, but the project hasn't seen any activity since 2010 -- I don't know if it's still alive or just very stable.