Closed
Bug 933786
Opened 12 years ago
Closed 12 years ago
[traceback] AttributeError: 'NoneType' object has no attribute 'strip'
Categories
(Input Graveyard :: Submission, defect, P3)
Input Graveyard
Submission
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: willkg, Assigned: willkg)
References
Details
(Whiteboard: u=user c=feedback p=1 s=input.2014q1)
Saw 4 of these today:
Traceback (most recent call last):
File "/data/www/input.allizom.org/input/vendor/lib/python/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib64/python2.6/site-packages/newrelic-1.11.0.55/newrelic/api/object_wrapper.py", line 216, in __call__
self._nr_instance, args, kwargs)
File "/usr/lib64/python2.6/site-packages/newrelic-1.11.0.55/newrelic/hooks/framework_django.py", line 475, in wrapper
return wrapped(*args, **kwargs)
File "/data/www/input.allizom.org/input/vendor-local/src/django-rest-framework/rest_framework/compat.py", line 121, in view
return self.dispatch(request, *args, **kwargs)
File "/data/www/input.allizom.org/input/vendor/lib/python/django/views/decorators/csrf.py", line 77, in wrapped_view
return view_func(*args, **kwargs)
File "/data/www/input.allizom.org/input/vendor-local/src/django-rest-framework/rest_framework/views.py", line 327, in dispatch
response = self.handle_exception(exc)
File "/data/www/input.allizom.org/input/vendor-local/src/django-rest-framework/rest_framework/views.py", line 324, in dispatch
response = handler(request, *args, **kwargs)
File "/data/www/input.allizom.org/input/vendor-local/src/django-rest-framework/rest_framework/generics.py", line 372, in post
return self.create(request, *args, **kwargs)
File "/data/www/input.allizom.org/input/vendor-local/src/django-rest-framework/rest_framework/mixins.py", line 50, in create
if serializer.is_valid():
File "/data/www/input.allizom.org/input/vendor-local/src/django-rest-framework/rest_framework/serializers.py", line 479, in is_valid
return not self.errors
File "/data/www/input.allizom.org/input/vendor-local/src/django-rest-framework/rest_framework/serializers.py", line 471, in errors
ret = self.from_native(data, files)
File "/data/www/input.allizom.org/input/vendor-local/src/django-rest-framework/rest_framework/serializers.py", line 324, in from_native
return self.restore_object(attrs, instance=getattr(self, 'object', None))
File "/data/www/input.allizom.org/input/fjord/feedback/models.py", line 232, in restore_object
device=attrs['device'].strip()
AttributeError: 'NoneType' object has no attribute 'strip'
It's worth checking into since it looks problematic.
Assignee | ||
Comment 1•12 years ago
|
||
Making this a P1 to look into asap. I've only gotten 4 and they're all on -stage, but it looks problematic and is probably an easy fix.
Assignee: nobody → willkg
Priority: -- → P1
Whiteboard: u=user c=feedback p= s=input.2013q4
Assignee | ||
Comment 2•12 years ago
|
||
I'm really puzzled by this. The device attribute is not a required field and it has a default. So if it's not provided, the default should kick in and that's an empty string--not a None.
Anyhow, I don't see obvious foul play here and I double-checked the documentation and we're doing restore_object as suggested. Ergo, I'm going to bump the priority way down and bump this out of this quarter.
Priority: P1 → P3
Whiteboard: u=user c=feedback p= s=input.2013q4 → u=user c=feedback p= s=
Assignee | ||
Comment 4•12 years ago
|
||
I keep getting these. Going to toss in a quick fix now.
Whiteboard: u=user c=feedback p= s= → u=user c=feedback p=1 s=input.2014q1
Assignee | ||
Comment 5•12 years ago
|
||
In a PR: https://github.com/mozilla/fjord/pull/213
Landed in master: https://github.com/mozilla/fjord/commit/2324aa3
Pushed to stage (where the problem keeps happening) and production (where it doesn't) just now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Input → Input Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•