Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django upgrade 1.9 -> 1.10 error with 'RemovedInDjango110Warning' import

Tags:

django

After simple pip install -U django I'm receiving following error.

Environment:

Request Method: GET
Request URL: http://localhost:8000/shelf/

Django Version: 1.10
Python Version: 3.5.2
Installed Applications:
['django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'shelf',
 'usermanagement',
 'avatar',
 'bootstrap3',
 'star_ratings',
 'imagekit',
 'allauth',
 'allauth.account',
 'allauth.socialaccount']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback:

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\utils.py" in __getitem__
  65.             return self._engines[alias]

During handling of the above exception ('django'), another exception occurred:

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\backends\django.py" in get_package_libraries
  126.             module = import_module(entry[1])

File "C:\Users\piomo\DEV\Django\market-env\lib\importlib\__init__.py" in import_module
  126.     return _bootstrap._gcd_import(name[level:], package, level)

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\templatetags\future.py" in <module>
  4. from django.utils.deprecation import RemovedInDjango110Warning

During handling of the above exception (cannot import name 'RemovedInDjango110Warning'), another exception occurred:

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\core\handlers\exception.py" in inner
  39.             response = get_response(request)

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\core\handlers\base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\core\handlers\base.py" in _get_response
  217.                 response = self.process_exception_by_middleware(e, request)

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\core\handlers\base.py" in _get_response
  215.                 response = response.render()

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\response.py" in render
  109.             self.content = self.rendered_content

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\response.py" in rendered_content
  84.         template = self.resolve_template(self.template_name)

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\response.py" in resolve_template
  66.             return select_template(template, using=self.using)

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\loader.py" in select_template
  44.     engines = _engine_list(using)

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\loader.py" in _engine_list
  72.     return engines.all() if using is None else [engines[using]]

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\utils.py" in all
  89.         return [self[alias] for alias in self]

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\utils.py" in <listcomp>
  89.         return [self[alias] for alias in self]

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\utils.py" in __getitem__
  80.             engine = engine_cls(params)

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\backends\django.py" in __init__
  30.         options['libraries'] = self.get_templatetag_libraries(libraries)

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\backends\django.py" in get_templatetag_libraries
  48.         libraries = get_installed_libraries()

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\backends\django.py" in get_installed_libraries
  113.             for name in get_package_libraries(pkg):

File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\backends\django.py" in get_package_libraries
  130.                 "trying to load '%s': %s" % (entry[1], e)

Exception Type: InvalidTemplateLibrary at /shelf/
Exception Value: Invalid template library specified. ImportError raised when trying to load 'django.templatetags.future': cannot import name 'RemovedInDjango110Warning'

Anyone? :)

Last time i saw RemovedInDjango110Warning it was in 1.9 and it was related to some = comparision in template, which was removed by me before update.

like image 763
pioootrek Avatar asked Aug 13 '16 11:08

pioootrek


1 Answers

From the comments:

django/templatetags/future.py was deprecated and removed at version 1.10.

Uninstalling Django, removed django/ folder before re-installation will solve this issue.

https://github.com/digitalocean/netbox/issues/497

https://github.com/jazzband/django-debug-toolbar/issues/706

like image 133
Gal Silberman Avatar answered Oct 14 '22 10:10

Gal Silberman