Closed
Bug 1076879
Opened 10 years ago
Closed 9 years ago
[traceback] "AttributeError: type object 'ResponseMappingType' has no attribute 'split'" when editing from admin
Categories
(Input Graveyard :: Submission, defect, P1)
Input Graveyard
Submission
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: willkg, Assigned: willkg)
Details
(Whiteboard: u=dev c=codequality p=1 s=input.2015q1)
I got a handful of these today when adding responses by hand from the admin: Task fjord.search.tasks.index_item_task with id 10b7fc0e-6f40-4338-9b4f-f449b0906676 raised exception: 'AttributeError("type object \'ResponseMappingType\' has no attribute \'split\'",)' Task was called with args: (<class 'fjord.feedback.models.ResponseMappingType'>, 4626219L) kwargs: {'_dummy': True}. The contents of the full traceback was: Traceback (most recent call last): File "/data/www/input.mozilla.org/input/vendor/src/celery/celery/task/trace.py", line 233, in trace_task R = retval = fun(*args, **kwargs) File "/data/www/input.mozilla.org/input/vendor/src/celery/celery/task/trace.py", line 420, in __protected_call__ return self.run(*args, **kwargs) File "/data/www/input.mozilla.org/input/fjord/search/tasks.py", line 73, in index_item_task mapping_type = from_class_path(cls_path) File "/data/www/input.mozilla.org/input/fjord/search/utils.py", line 56, in from_class_path module_path, cls_name = cls_path.split(':') AttributeError: type object 'ResponseMappingType' has no attribute 'split' I'm guessing what's going on is that there's a path through the code where updating a response creates an indexing task that's got a poorly formed cls_path.
Assignee | ||
Comment 1•10 years ago
|
||
Bumping to 2015q1 because we're out of time for 2014q4.
Whiteboard: u=dev c=codequality p= s=input.2014q4 → u=dev c=codequality p= s=input.2015q1
Assignee | ||
Comment 3•9 years ago
|
||
Adam: Can you write up the steps you used to reproduce this?
Flags: needinfo?(aokoye)
I am not positive I reproduced the error but if it did it was when I was running this code at the bottom of _handle_feedback_post within the fjord/feedback/views.py file: if request.session.get('has_commented', False): return HttpResponse("You've already commented.") request_id = datetime.date request_id.save() request.session['has_commented'] = True return HttpResponse('Thanks for your comment!') I think what's causing it is: request_id = datetime.date . The error would occur when I would attempt to submit feedback, specifically when the feedback was attempting to save.
Flags: needinfo?(aokoye)
Assignee | ||
Comment 5•9 years ago
|
||
Found the problem--grabbing this to fix now.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Whiteboard: u=dev c=codequality p= s=input.2015q1 → u=dev c=codequality p=1 s=input.2015q1
Assignee | ||
Comment 6•9 years ago
|
||
In a PR: https://github.com/mozilla/fjord/pull/471
Assignee | ||
Comment 7•9 years ago
|
||
Landed in master: https://github.com/mozilla/fjord/commit/997702ff1fef5ef2503b6fa2108f6f26c48bb65d Will push later.
Assignee | ||
Comment 8•9 years ago
|
||
Pushed this to production just now. Marking as FIXED.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Input → Input Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•