cfpb / regulations-site

(DEPRECATED) Web interface for viewing U.S. federal regulations and other regulatory information
Other
28 stars 43 forks source link

Leave NoneType alone! #811

Closed rosskarchner closed 7 years ago

rosskarchner commented 8 years ago

Via NewRelic, we're seeing a bunch of:

Sample stacktraces below:

url /eregulations/sxs/1004-3/2011-18676

exceptions:TypeError: 'NoneType' object has no attribute 'getitem' Traceback (most recent call last): File "/srv/cfgov/current/venv/lib/python2.7/site-packages/newrelic-2.64.0.48/newrelic/api/web_transaction.py", line 724, in iter File "/srv/cfgov/current/venv/lib/python2.7/site-packages/newrelic-2.64.0.48/newrelic/api/web_transaction.py", line 1100, in call File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 189, in call File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response File "/srv/cfgov/current/venv/lib/python2.7/site-packages/newrelic-2.64.0.48/newrelic/hooks/framework_django.py", line 503, in wrapper File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view File "/srv/cfgov/current/venv/lib/python2.7/site-packages/newrelic-2.64.0.48/newrelic/hooks/framework_django.py", line 876, in wrapper File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch File "/srv/cfgov/current/venv/lib/python2.7/site-packages/regulations/views/chrome.py", line 43, in get File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/views/generic/base.py", line 158, in get File "/srv/cfgov/current/venv/lib/python2.7/site-packages/regulations/views/chrome_breakaway.py", line 27, in get_context_data

url /eregulations/sxs/1026-32-b-1-iv/2013-00740

exceptions:TypeError: 'NoneType' object has no attribute 'getitem' Traceback (most recent call last): File "/srv/cfgov/current/venv/lib/python2.7/site-packages/newrelic-2.64.0.48/newrelic/api/web_transaction.py", line 724, in iter File "/srv/cfgov/current/venv/lib/python2.7/site-packages/newrelic-2.64.0.48/newrelic/api/web_transaction.py", line 1100, in call File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 189, in call File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response File "/srv/cfgov/current/venv/lib/python2.7/site-packages/newrelic-2.64.0.48/newrelic/hooks/framework_django.py", line 503, in wrapper File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view File "/srv/cfgov/current/venv/lib/python2.7/site-packages/newrelic-2.64.0.48/newrelic/hooks/framework_django.py", line 876, in wrapper File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch File "/srv/cfgov/current/venv/lib/python2.7/site-packages/regulations/views/chrome.py", line 43, in get File "/srv/cfgov/current/venv/lib/python2.7/site-packages/django/views/generic/base.py", line 158, in get File "/srv/cfgov/current/venv/lib/python2.7/site-packages/regulations/views/chrome_breakaway.py", line 27, in get_context_data