-
Notifications
You must be signed in to change notification settings - Fork 10
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
Bug - 500 error for /dissemination/search/: 'NoneType' object is not iterable #4731
Comments
I tried replicating this both locally and in prod using the same search params and never encountered a 500. I'm not seeing anything suspicious with the code, either. Closing for now! |
Still seeing a handful of these each week. Reopening. |
It's difficult to get this to happen locally. It looks like the form comes in invalid, and so the default I can get it to happen occasionally by inputting a bad fiscal year start/end date. See here: FAC/backend/dissemination/views.py Line 236 in 3d7a87d
Perhaps this is quickly fixed by doing one of:
|
Also occurs with /advanced
Erroring line: https://github.com/GSA-TTS/FAC/blob/main/backend/dissemination/views.py#L135
Example request: https://one.newrelic.com/logger?account=3919076&begin=1740511680000&end=1740511800000&state=ccc0bf9f-ffb8-ed81-0c43-b6e16ab75ae6
Example response: https://onenr.io/0ZQWXJk63wW
"Traceback (most recent call last):\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner\n response = get_response(request)\n ^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response\n response = wrapped_callback(request, *callback_args, **callback_kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/newrelic/hooks/framework_django.py", line 527, in wrapper\n return wrapped(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view\n return self.dispatch(request, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/utils/decorators.py", line 48, in _wrapper\n return bound_method(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper\n return view_func(request, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/app/dissemination/views.py", line 158, in dispatch\n return super(AdvancedSearch, self).dispatch(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/newrelic/hooks/framework_django.py", line 900, in wrapper\n return wrapped(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/views/generic/base.py", line 143, in dispatch\n return handler(request, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/app/support/decorators.py", line 15, in wrapper_timer\n value = func(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/app/dissemination/views.py", line 236, in post\n paginator_results = _populate_cog_over_name(paginator_results)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/app/dissemination/views.py", line 135, in _populate_cog_over_name\n for result in results:\n ^^^^^^^\nTypeError: 'NoneType' object is not iterable"
The text was updated successfully, but these errors were encountered: