#10054 closed defect (cantfix)
TypeError: save_changes() takes at least 3 arguments (2 given)
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | 0.11 |
| Severity: | normal | Keywords: | |
| Cc: | support@… | Branch: | |
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
How to Reproduce
While doing a POST operation on /ticket/2584, Trac issued an internal error.
(please provide additional details here)
Request parameters:
{'__FORM_TOKEN': u'a9e28433d6fc446a2ff6591f',
'action': u'pass',
'cnum': u'4',
'comment': u'',
'field_description': u'',
'field_fixer': u'',
'field_priority': u'normal',
'field_reporter': u'andrei.bogdan@machteamsoft.ro',
'field_sprint': u'',
'field_summary': u'asdasdadasdadasdasd',
'field_tester': u'',
'field_type': u'bug',
'id': u'2584',
'pane': u'edit',
'replyto': u'',
'submit': u'Submit changes',
'ts': u'2011-02-28 06:43:45+00:00'}
User Agent was: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13
System Information
| Trac | 0.11
|
| Python | 2.5.5 (r255:77872, Dec 8 2010, 11:43:14) [GCC 4.4.3]
|
| setuptools | 0.6
|
| SQLite | 3.6.22
|
| pysqlite | 2.3.2
|
| Genshi | 0.6
|
| Agilo | 0.9.1
|
| jQuery: | 1.2.3
|
Python Traceback
Traceback (most recent call last):
File "/opt/trac/0.11/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request
dispatcher.dispatch(req)
File "/opt/trac/0.11/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 197, in dispatch
resp = chosen_handler.process_request(req)
File "/opt/trac/0.11/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/ticket/web_ui.py", line 152, in process_request
return self._process_ticket_request(req)
File "/opt/trac/0.11/lib/python2.5/site-packages/agilo-0.9.1-py2.5.egg/agilo/ticket/web_ui.py", line 224, in _process_ticket_request
template, data, content_type = super(AgiloTicketModule, self)._process_ticket_request(req)
File "/opt/trac/0.11/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/ticket/web_ui.py", line 471, in _process_ticket_request
self._do_save(req, ticket, action)
File "/opt/trac/0.11/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/ticket/web_ui.py", line 966, in _do_save
cnum=internal_cnum):
File "/opt/trac/0.11/lib/python2.5/site-packages/agilo-0.9.1-py2.5.egg/agilo/ticket/model.py", line 744, in save_changes
res = super(AgiloTicket, self).save_changes(author, comment, when, db, cnum)
File "/opt/trac/0.11/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/ticket/model.py", line 282, in save_changes
listener.ticket_changed(self, comment, author, old_values)
File "/var/www/agilo/plugins/MachTicketObserver.py", line 133, in ticket_changed
ticket.save_changes(author)
TypeError: save_changes() takes at least 3 arguments (2 given)
Attachments (0)
Change History (11)
follow-up: 4 comment:1 by , 15 years ago
| Cc: | added |
|---|---|
| Description: | modified (diff) |
| Resolution: | → cantfix |
| Status: | new → closed |
comment:2 by , 15 years ago
I try to make a custom save using the following sequence:
ticket.save_changes(author)
comment:3 by , 15 years ago
@reporter: as cboos has said on the other ticket, please upgrade to 0.11.7 (recommended) (or 0.12.x) and see if the problem persists - If so, please concact our support google group so we can help you resolve the issue. More info on how to access the group at AgiloForScrum
comment:4 by , 15 years ago
Replying to cboos:
AgiloForScrum issue.
Actually it's a PluginIssue, but Agilo is not the culprit here it seems. MachTicketObserver.py is the bad guy.
comment:5 by , 15 years ago
Probably, but seeing agilo/plugins/MachTicketObserver.py in the traceback and not having heard of MachTicketObserver before, it seemed to be an Agilo plugin. Maybe use agilo/3rdparty-plugins/...? ;-)
comment:6 by , 15 years ago
Agilo has no plugins directory, the reporter just used 'agilo' in the path :-)
Anyway, thanks for your ticket janitor work, I'll try to copy that approach for Babel.
follow-up: 8 comment:7 by , 15 years ago
In agilo/plugins/MachTicketObserver.py I try to do a ticket.save_changes. If I try ticket.save_changes(author) "TypeError: save_changes() takes at least 3 arguments (2 given)" is raised. If I try ticket.save_changes(author, comment) "IntegrityError: columns ticket, time, field are not unique" is raised.
I use Agilo on trac 0.11. I use the same script on trac 0.12 with no problem.
comment:8 by , 15 years ago
Replying to anonymous:
In agilo/plugins/MachTicketObserver.py I try to do a ticket.save_changes.
Ah… I understand now. MachTicketObserver.py is a plugin you've written..
I use Agilo on trac 0.11. I use the same script on trac 0.12 with no problem.
Well, Ticket.save_changes() has indeed changed in 0.12, Felix could have told you ;-) (#9217).
comment:9 by , 15 years ago
If i modify in trac/ticket/model.py version 0.11 def save_changes(self, author, comment=None, when=None, db=None, cnum=): agilo will be afected? Or I should upgrade to trac 0.11.7?
comment:11 by , 15 years ago
And the IntegrityError is because in Trac 0.11 you can only save a ticket once per second. That's different in 0.12 because of millisecond precision of timestamps.
Basically this means that you must not save a ticket again when called from a ticket change listener.



AgiloForScrum issue.