Modify ↓
Opened 5 years ago
Closed 5 years ago
#13728 closed defect (fixed)
save_changes() got an unexpected keyword argument 'cnum' in TracBacksPlugin on Trac 1.4
Reported by: | Justin Ludwig | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | TracBacksPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.4 |
Description
With Trac 1.4, getting a TypeError: save_changes() got an unexpected keyword argument 'cnum'
error when adding a comment that references another ticket.
Repo Steps
On Trac 1.4 with TracBacksPlugin installed:
- navigate to ticket 1
- enter comment
this is related to #2
in "Add Comment" textarea - click "Submit changes" button
Expected
Comment added to ticket 1 with no errors; and tracbacks comment added to ticket 2.
Actual
Comment added to ticket 1, but resulting webpage displays 500 error, and following sent to trac log:
2020-01-09 21:21:55,671 Trac[main] ERROR: [192.0.1.1] Internal Server Error: <RequestWithSession "POST '/ticket/1'">, referrer 'https://trac.example.com/test/ticket/1' Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 639, in dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 250, in dispatch resp = chosen_handler.process_request(req) File "/usr/local/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 183, in process_request return self._process_ticket_request(req) File "/usr/local/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 689, in _process_ticket_request self._do_save(req, ticket, action) File "/usr/local/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 1401, in _do_save replyto=req.args.get('replyto')) File "/usr/local/lib/python2.7/dist-packages/trac/ticket/model.py", line 430, in save_changes listener.ticket_changed(self, comment, author, old_values) File "/usr/local/lib/python2.7/dist-packages/Tracbacks-0.2.dev0-py2.7.egg/tracbacks/tracbacks.py", line 87, in ticket_changed t.save_changes(author, tracback, cnum=cnum_thischange) TypeError: save_changes() got an unexpected keyword argument 'cnum'
Also, trackbacks comment not added to ticket 2, and ticket-update email notifications not sent.
Workaround
Editing the TracBacksPlugin tracbacks/tracbacks.py file to remove the cnum
arg from the save_changes()
call seems to fix the issue.
Attachments (0)
Change History (3)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
Owner: | changed from ejucovy to Ryan J Ollos |
---|---|
Status: | new → accepted |
Note: See
TracTickets for help on using
tickets.
Specifically, this change fixes the issue for me, with no other ill effects I've found so far: