Problems with "django.templatetags.future" after upgrade to 1.5.2 #384

Closed
opened 2025-12-29 16:21:33 +01:00 by adam · 3 comments
Owner

Originally created by @alarido on GitHub (Aug 22, 2016).

I upgraded using the documentation the same way I have done before, but once I try to access netbox I get the following exception:

[ERROR] Error handling request
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/gunicorn/workers/sync.py", line 99, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 170, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 124, in get_response
    response = self._middleware_chain(request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner
    response = response_for_exception(request, exc)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 86, in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 135, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/opt/netbox/netbox/netbox/views.py", line 62, in handle_500
    }, status=500)
  File "/usr/local/lib/python2.7/dist-packages/django/shortcuts.py", line 30, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 67, in render_to_string
    template = get_template(template_name, using=using)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 18, in get_template
    engines = _engine_list(using)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 72, in _engine_list
    return engines.all() if using is None else [engines[using]]
  File "/usr/local/lib/python2.7/dist-packages/django/template/utils.py", line 89, in all
    return [self[alias] for alias in self]
  File "/usr/local/lib/python2.7/dist-packages/django/template/utils.py", line 80, in __getitem__
    engine = engine_cls(params)
  File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 30, in __init__
    options['libraries'] = self.get_templatetag_libraries(libraries)
  File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 48, in get_templatetag_libraries
    libraries = get_installed_libraries()
  File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 113, in get_installed_libraries
    for name in get_package_libraries(pkg):
  File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 130, in get_package_libraries
    "trying to load '%s': %s" % (entry[1], e)
InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'django.templatetags.future': cannot import name RemovedInDjango110Warning
Originally created by @alarido on GitHub (Aug 22, 2016). I upgraded using the documentation the same way I have done before, but once I try to access netbox I get the following exception: ``` [ERROR] Error handling request Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/gunicorn/workers/sync.py", line 99, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 170, in __call__ response = self.get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 124, in get_response response = self._middleware_chain(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 86, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 135, in handle_uncaught_exception return callback(request, **param_dict) File "/opt/netbox/netbox/netbox/views.py", line 62, in handle_500 }, status=500) File "/usr/local/lib/python2.7/dist-packages/django/shortcuts.py", line 30, in render content = loader.render_to_string(template_name, context, request, using=using) File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 67, in render_to_string template = get_template(template_name, using=using) File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 18, in get_template engines = _engine_list(using) File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 72, in _engine_list return engines.all() if using is None else [engines[using]] File "/usr/local/lib/python2.7/dist-packages/django/template/utils.py", line 89, in all return [self[alias] for alias in self] File "/usr/local/lib/python2.7/dist-packages/django/template/utils.py", line 80, in __getitem__ engine = engine_cls(params) File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 30, in __init__ options['libraries'] = self.get_templatetag_libraries(libraries) File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 48, in get_templatetag_libraries libraries = get_installed_libraries() File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 113, in get_installed_libraries for name in get_package_libraries(pkg): File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 130, in get_package_libraries "trying to load '%s': %s" % (entry[1], e) InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'django.templatetags.future': cannot import name RemovedInDjango110Warning ```
adam closed this issue 2025-12-29 16:21:33 +01:00
Author
Owner

@alarido commented on GitHub (Aug 22, 2016):

I had to remove the following files to solve the problem:

/usr/local/lib/python2.7/dist-packages/django/templatetags/future.py 
/usr/local/lib/python2.7/dist-packages/django/templatetags/future.pyc

@alarido commented on GitHub (Aug 22, 2016): I had to remove the following files to solve the problem: ``` /usr/local/lib/python2.7/dist-packages/django/templatetags/future.py /usr/local/lib/python2.7/dist-packages/django/templatetags/future.pyc ```
Author
Owner

@jeremystretch commented on GitHub (Sep 7, 2016):

I'm going to close this due to inactivity, but will note that deleting core Django file is probably not the correct solution.

@jeremystretch commented on GitHub (Sep 7, 2016): I'm going to close this due to inactivity, but will note that deleting core Django file is probably **not** the correct solution.
Author
Owner

@karyon commented on GitHub (Oct 31, 2016):

for other people landing here, this file does not exist anymore in django 1.10, and in my case was a leftover from an older django version that was not properly removed. so i'd say it's safe to remove.

@karyon commented on GitHub (Oct 31, 2016): for other people landing here, this file does not exist anymore in django 1.10, and in my case was a leftover from an older django version that was not properly removed. so i'd say it's safe to remove.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#384