Modify

Opened 13 months ago

Closed 3 months ago

#11183 closed defect (wontfix)

Error on Ticket-Action

Reported by: jan.schmidt@… Owned by: ChrisNelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

every action with tickets (create, change, etc.) result in the following error.

I fount, that

result 	{}

at the line

result['href'] = req.href.ticket(val)

Trac detected an internal error:

AttributeError: 'NoneType' object has no attribute 'href'

Most recent call last:

File "c:/users/franball/appdata/local/temp/2/easy_install-lixnu4/Trac-0.12.1-py2.6-win32.egg.tmp/trac/web/main.py", line 511, in _dispatch_request
  dispatcher.dispatch(req)
File "c:/users/franball/appdata/local/temp/2/easy_install-lixnu4/Trac-0.12.1-py2.6-win32.egg.tmp/trac/web/main.py", line 237, in dispatch
  resp = chosen_handler.process_request(req)
File "c:/users/franball/appdata/local/temp/2/easy_install-lixnu4/Trac-0.12.1-py2.6-win32.egg.tmp/trac/ticket/web_ui.py", line 169, in process_request
  return self._process_ticket_request(req)
File "c:/users/franball/appdata/local/temp/2/easy_install-lixnu4/Trac-0.12.1-py2.6-win32.egg.tmp/trac/ticket/web_ui.py", line 541, in _process_ticket_request
  self._do_save(req, ticket, action)
File "c:/users/franball/appdata/local/temp/2/easy_install-lixnu4/Trac-0.12.1-py2.6-win32.egg.tmp/trac/ticket/web_ui.py", line 1238, in _do_save
  cnum=internal_cnum):
File "c:/users/franball/appdata/local/temp/2/easy_install-lixnu4/Trac-0.12.1-py2.6-win32.egg.tmp/trac/ticket/model.py", line 360, in save_changes
  listener.ticket_changed(self, comment, author, old_values)
File "build/bdist.win32/egg/tracjsgantt/tracpm.py", line 2950, in ticket_changed
  self.rescheduleTickets(ticket, old_values)
File "build/bdist.win32/egg/tracjsgantt/tracpm.py", line 2753, in rescheduleTickets
  tickets = self.queryTickets(ids)
File "build/bdist.win32/egg/tracjsgantt/tracpm.py", line 2549, in queryTickets
  return self.pm.query(options, set())
File "build/bdist.win32/egg/tracjsgantt/tracpm.py", line 1193, in query
  tickets = query.execute(req)
File "c:/users/franball/appdata/local/temp/2/easy_install-lixnu4/Trac-0.12.1-py2.6-win32.egg.tmp/trac/ticket/query.py", line 330, in execute
  result['href'] = req.href.ticket(val)

I used

trac-jsgantt 0.10-r12998

installed from svn today

Attachments (0)

Change History (8)

comment:1 follow-up: Changed 13 months ago by ChrisNelson

Please try disabling the background ticket rescheduler and see if that helps. I'm working in that module and hope to fix this soon.

comment:2 in reply to: ↑ 1 Changed 13 months ago by anonymous

Replying to ChrisNelson:

Please try disabling the background ticket rescheduler and see if that helps. I'm working in that module and hope to fix this soon.

I try'd to modify a ticket and to create a new ticket. Both tests worked.

comment:3 Changed 11 months ago by ChrisNelson

Can you post your trac.ini sections for TracPM and Trac-jsGantt? I don't see this problem.

comment:4 Changed 4 months ago by rjollos

From following the traceback, we can see that TracPM.query is called without a req argument. Therefore the req parameter in TracPM.query will be None, and query.execute shouldn't be called without passing a Request object: tracjsganttplugin/0.11/tracjsgantt/tracpm.py@13705:1197#L1161. At least, it should be called with req=None prior to Trac 0.12.2: [trac 10378].

So unless a workaround it put in place, the minimum Trac version for this plugin will need to be 0.12.2.

comment:5 Changed 3 months ago by ChrisNelson

I have the plugin working in 0.11.6 (with some local changes) and 1.0.1. I don't quite understand the comment about 0.12.2 being required.

comment:6 follow-up: Changed 3 months ago by rjollos

I explained in comment:4, prior to [trac 10378] which was included in Trac 0.12.2, you have to pass a Request object to Query.count and Query.execute. However, in the case leading to the error, TracPM.query is called without a Request object, which leads to Query.execute being called without passing a Request object (req = None).

Perhaps your local changes included the patch in [trac 10378].

comment:7 in reply to: ↑ 6 Changed 3 months ago by ChrisNelson

Replying to rjollos:

I explained in comment:4, prior to [trac 10378] which was included in Trac 0.12.2, you have to pass a Request object to Query.count and Query.execute. However, in the case leading to the error, TracPM.query is called without a Request object, which leads to Query.execute being called without passing a Request object (req = None).

Perhaps your local changes included the patch in [trac 10378].

Yeah, that seems likely since I originated that patch. ;-)

comment:8 Changed 3 months ago by ChrisNelson

  • Resolution set to wontfix
  • Status changed from new to closed

I think that the background rescheduler requires ​[trac 10378]. Because it runs in background, it has no request so there is no way to make one up reasonable. So:

  1. Apply the patch, or
  2. Disable the background rescheduler

Sorry I can't do better.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from ChrisNelson. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.