Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[ERROR] Internal Server Error: /users/xxx/edit [log:228]
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.7/site-packages/django/db/utils.py", line 96, in inner
return func(*args, **kwargs)
psycopg2.OperationalError: cursor "_django_curs_140623481681664_3" does not exist
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1552, in cursor_iter
for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):
File "/app/.heroku/python/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1552, in <lambda>
for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):
File "/app/.heroku/python/lib/python3.7/site-packages/django/db/utils.py", line 96, in inner
return func(*args, **kwargs)
File "/app/.heroku/python/lib/python3.7/site-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/app/.heroku/python/lib/python3.7/site-packages/django/db/utils.py", line 96, in inner
return func(*args, **kwargs)
django.db.utils.OperationalError: cursor "_django_curs_140623481681664_3" does not exist
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/hooks/framework_django.py", line 544, in wrapper
return wrapped(*args, **kwargs)
File "/app/.heroku/python/lib/python3.7/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/app/mysite/snakes/views.py", line 4384, in edit_user_profile
return render(request, 'accounts/edit_user_profile.html', context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/shortcuts.py", line 36, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/loader.py", line 62, in render_to_string
return template.render(context, request)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 171, in render
return self._render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/api/function_trace.py", line 103, in dynamic_wrapper
return return_value(trace, lambda: wrapped(*args, **kwargs))
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/api/coroutine_trace.py", line 171, in return_value
return fn()
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/api/function_trace.py", line 103, in <lambda>
return return_value(trace, lambda: wrapped(*args, **kwargs))
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
return self.nodelist.render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/api/function_trace.py", line 103, in dynamic_wrapper
return return_value(trace, lambda: wrapped(*args, **kwargs))
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/api/coroutine_trace.py", line 171, in return_value
return fn()
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/api/function_trace.py", line 103, in <lambda>
return return_value(trace, lambda: wrapped(*args, **kwargs))
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
return self.nodelist.render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/hooks/framework_django.py", line 769, in wrapper
return wrapped(*args, **kwargs)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/loader_tags.py", line 188, in render
return template.render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 173, in render
return self._render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/api/function_trace.py", line 103, in dynamic_wrapper
return return_value(trace, lambda: wrapped(*args, **kwargs))
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/api/coroutine_trace.py", line 171, in return_value
return fn()
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/api/function_trace.py", line 103, in <lambda>
return return_value(trace, lambda: wrapped(*args, **kwargs))
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
return self.nodelist.render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 993, in render
return render_value_in_context(output, context)
File "/app/.heroku/python/lib/python3.7/site-packages/django/template/base.py", line 972, in render_value_in_context
value = str(value)
File "/app/.heroku/python/lib/python3.7/site-packages/django/utils/html.py", line 388, in <lambda>
klass.__str__ = lambda self: mark_safe(klass_str(self))
File "/app/.heroku/python/lib/python3.7/site-packages/django/forms/boundfield.py", line 33, in __str__
return self.as_widget()
File "/app/.heroku/python/lib/python3.7/site-packages/widget_tweaks/templatetags/widget_tweaks.py", line 31, in as_widget
html = old_as_widget(widget, attrs, only_initial)
File "/app/.heroku/python/lib/python3.7/site-packages/django/forms/boundfield.py", line 93, in as_widget
renderer=self.form.renderer,
File "/app/.heroku/python/lib/python3.7/site-packages/django/forms/widgets.py", line 241, in render
context = self.get_context(name, value, attrs)
File "/app/.heroku/python/lib/python3.7/site-packages/django/forms/widgets.py", line 678, in get_context
context = super().get_context(name, value, attrs)
File "/app/.heroku/python/lib/python3.7/site-packages/django/forms/widgets.py", line 639, in get_context
context['widget']['optgroups'] = self.optgroups(name, context['widget']['value'], attrs)
File "/app/.heroku/python/lib/python3.7/site-packages/django/forms/widgets.py", line 587, in optgroups
for index, (option_value, option_label) in enumerate(self.choices):
File "/app/.heroku/python/lib/python3.7/site-packages/django/forms/models.py", line 1137, in __iter__
for obj in queryset:
File "/app/.heroku/python/lib/python3.7/site-packages/django/db/models/query.py", line 341, in _iterator
yield from self._iterable_class(self, chunked_fetch=use_chunked_fetch, chunk_size=chunk_size)
File "/app/.heroku/python/lib/python3.7/site-packages/django/db/models/query.py", line 72, in __iter__
for row in compiler.results_iter(results):
File "/app/.heroku/python/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1555, in cursor_iter
cursor.close()
psycopg2.OperationalError: cursor "_django_curs_140623481681664_3" does not exist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment