Modify

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#3900 closed defect (fixed)

.11.1 genshi support

Reported by: mixedpuppy Owned by: echo0101
Priority: highest Component: TracTicketStatsPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.11

Description

will attach patch

Attachments (1)

ticketstats-genshi.zip (1.8 KB) - added by mixedpuppy 6 years ago.
updated patch

Download all attachments as: .zip

Change History (7)

comment:1 Changed 6 years ago by mixedpuppy

well, I would post a patch, but I get "Submission rejected as potential spam (Maximum number of external links per post exceeded)". I'm assuming trac is considering the patch itself as part of a post, and rejecting the html file in the patch.

comment:2 Changed 6 years ago by anonymous

  • Priority changed from normal to highest
  • Severity changed from normal to blocker
  • Trac Release changed from 0.10 to 0.11

comment:3 Changed 6 years ago by didoux

Applying the patch (a bit blindly) gives me

 Trac detected an internal error:
    ValueError: need more than 1 value to unpack

Most recent call last:

    * File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 423, in _dispatch_request
      Code fragment:
       418. try:
       419. if not env and env_error:
       420. raise HTTPInternalError(env_error)
       421. try:
       422. dispatcher = RequestDispatcher(env)
       423. dispatcher.dispatch(req)
       424. except RequestDone:
       425. pass
       426. resp = req._response or []
       427.  
       428. except HTTPException, e:
      Local variables:
      Name	Value
      after 	[u' except RequestDone:', u' pass', u' resp = ...
      before 	[u' try:', u' if not env and env_error:', u' raise ...
      dispatcher 	<trac.web.main.RequestDispatcher object at 0xa3a14a2c>
      e 	<exceptions.ValueError instance at 0xa28ea3ac>
      env 	<trac.env.Environment object at 0xa539bbac>
      env_error 	None
      exc_info 	(<class exceptions.ValueError at 0xb30a4b0c>, <exceptions.ValueError ...
      filename 	'/usr/lib/python2.4/site-packages/trac/web/main.py'
      frames 	[{'function': '_dispatch_request', 'lines_before': [u' try:', u' ...
      has_admin 	True
      line 	u' dispatcher.dispatch(req)'
      lineno 	422
      message 	u'ValueError: need more than 1 value to unpack'
      req 	<Request "GET u'/ticketstats'">
      resp 	[]
      tb 	<traceback object at 0xa2772d74>
      tb_hide 	None
      traceback 	'Traceback (most recent call last):\n File ...
    * File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 208, in dispatch
      Code fragment:
       203. # Give the session a chance to persist changes
       204. if req.session:
       205. req.session.save()
       206. req.display(template, content_type or 'text/html')
       207. else: # Genshi
       208. template, data, content_type = \
       209. self._post_process_request(req, *resp)
       210. if 'hdfdump' in req.args:
       211. req.perm.require('TRAC_ADMIN')
       212. # debugging helper - no need to render first
       213. from pprint import pprint
      Local variables:
      Name	Value
      chosen_handler 	<ticketstats.ticketstats.TicketStatsPlugin object at 0xa3a0dbac>
      chrome 	<trac.web.chrome.Chrome object at 0xa515282c>
      e 	<exceptions.ValueError instance at 0xa27ab78c>
      err 	(<class exceptions.ValueError at 0xb30a4b0c>, <exceptions.ValueError ...
      handler 	<ticketstats.ticketstats.TicketStatsPlugin object at 0xa3a0dbac>
      req 	<Request "GET u'/ticketstats'">
      resp 	('greensauce.html', {'ticket_data': [{'date': '06/12/2008 thru ...
      self 	<trac.web.main.RequestDispatcher object at 0xa3a14a2c>
    * File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 299, in _post_process_request
      Code fragment:
       294. # Trac 0.10, only filters with same arity gets passed real values.
       295. # Errors will call all filters with None arguments,
       296. # and results will not be not saved.
       297. extra_arg_count = arity(f.post_process_request) - 2
       298. if extra_arg_count == nbargs:
       299. resp = f.post_process_request(req, *resp)
       300. elif nbargs == 0:
       301. f.post_process_request(req, *(None,)*extra_arg_count)
       302. return resp
       303.  
       304.  
      Local variables:
      Name	Value
      args 	('greensauce.html', {'ticket_data': [{'date': '06/12/2008 thru ...
      extra_arg_count 	3
      f 	<announcerplugin.subscribers.watchers.WatchSubscriber object at ...
      nbargs 	3
      req 	<Request "GET u'/ticketstats'">
      resp 	('greensauce.html', {'ticket_data': [{'date': '06/12/2008 thru ...
      self 	<trac.web.main.RequestDispatcher object at 0xa3a14a2c>
    * File "build/bdist.linux-i686/egg/announcerplugin/subscribers/watchers.py", line 134, in post_process_request
      Local variables:
      Name	Value
      content_type 	None
      data 	{'ticket_data': [{'date': '06/12/2008 thru 07/12/2008', 'new': 0, 'open': ...
      path 	u'ticketstats'
      pattern 	u'ticket/*'
      req 	<Request "GET u'/ticketstats'">
      self 	<announcerplugin.subscribers.watchers.WatchSubscriber object at ...
      template 	'greensauce.html'

File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 423, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 208, in dispatch
  template, data, content_type = \
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 299, in _post_process_request
  resp = f.post_process_request(req, *resp)
File "build/bdist.linux-i686/egg/announcerplugin/subscribers/watchers.py", line 134, in post_process_request

System Information:

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Trac: 	0.11.1
Python: 	2.4.4 (#1, Oct 22 2008, 19:49:52) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]
setuptools: 	0.6c3
SQLite: 	3.3.8
pysqlite: 	2.3.2
Genshi: 	0.5.1
mod_python: 	3.2.10
Pygments: 	0.9
Subversion: 	1.4.2 (r22196)
jQuery:	1.2.6

Changed 6 years ago by mixedpuppy

updated patch

comment:4 Changed 6 years ago by mixedpuppy

I just added the latest version of the patch, which I am currently using with Trac .11.2.1, Python 2.5

comment:5 Changed 5 years ago by echo0101

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

applied patch in [10354].

Thanks!

comment:6 Changed 5 years ago by echo0101

EDIT: applied patch in [6379]

Add Comment

Modify Ticket

Action
as 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.