Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
alarido opened this issue Aug 22, 2016 · 3 comments
Closed

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

alarido opened this issue Aug 22, 2016 · 3 comments

Comments

@alarido
Copy link

alarido commented 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
@alarido
Copy link
Author

alarido commented 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

@jeremystretch
Copy link
Member

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

@karyon
Copy link

karyon commented 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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants