Modify

Opened 5 years ago

Closed 5 years ago

#6252 closed defect (fixed)

Hudons Trac Plugin: Trac[main] ERROR: iterable argument required

Reported by: ffidelis@… Owned by: roadrunner
Priority: normal Component: HudsonTracPlugin
Severity: normal Keywords: Trac[main] ERROR: iterable argument required
Cc: Trac Release: 0.10

Description

Hi there!

  • I need some help when create the egg file (HudsonPlugin-0.3.py23.egg) generated version 0.10 r7165 from svn repo and install it in plugin directory in one project only called test and edited trac.ini file project adding parameters:

(...)
[components]
hudsontrac.* = enabled

[hudson]
job_url = http://hostname:8080/hudson[[BR]]
display_modules=true
main_page=/hudson/
display_in_new_tab=true
(...)

  • After restart the services, when access the project page, I have a message like:

Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 387, in dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 208, in dispatch

chrome.populate_hdf(req, chosen_handler)

File "/usr/lib/python2.3/site-packages/trac/web/chrome.py", line 319, in populate_hdf

for category, name, text in contributor.get_navigation_items(req):

File "build/bdist.linux-x86_64/egg/HudsonTrac/HudsonTracPlugin.py", line 97, in get_navigation_items

TypeError: iterable argument required

  • And I see that plugin is loaded sucessfully in trac.log, but when somebody access the page of project have the error "Trac[main] ERROR: iterable argument required":

2009-11-23 09:19:12,681 Trac[loader] DEBUG: Loading egg plugin HudsonTrac from /
direct/area_desenv/trac/test/plugins/HudsonTrac-0.3-py2.3.egg
2009-11-24 09:20:40,223 Trac[HudsonTracPlugin] DEBUG: registered auth-handler for 'http://hostname:8080/hudson/api/xml', username=' '
2009-11-24 09:20:40,223 Trac[HudsonTracPlugin] DEBUG: Build-info url: 'http://hostname:8080/hudson/api/xml?xpath=/*/job/build[timestamp>=%(start)s][timestamp<=%(stop)s]|/*/job/module/build[timestamp>=%(start)s][timestamp<=%(stop)s]&depth=3&exclude=action|artifact|changeSet|culprit&wrapper=builds'
2009-11-24 09:20:40,252 Trac[main] ERROR: iterable argument required
Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 387, in dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 208, in dispatch

chrome.populate_hdf(req, chosen_handler)

File "/usr/lib/python2.3/site-packages/trac/web/chrome.py", line 319, in populate_hdf

for category, name, text in contributor.get_navigation_items(req):

File "build/bdist.linux-x86_64/egg/HudsonTrac/HudsonTracPlugin.py", line 97, in get_navigation_items

TypeError: iterable argument required

Thanks for any help!

Attachments (1)

hudsonplugin_trac_0.10_error.jpg (127.9 KB) - added by ffidelis@… 5 years ago.
second error

Download all attachments as: .zip

Change History (7)

comment:1 Changed 5 years ago by roadrunner

  • Status changed from new to assigned

I'm not sure, but I think this may be related to trac 0.10 (I only
have 0.11 instances to test). Try replacing line 97

        if self.nav_url and 'BUILD_VIEW' in req.perm:

with

        if self.nav_url and req.perm.has_permission('BUILD_VIEW'):

and similarly on lines 113 and 117, and let me know if that fixes
it.

comment:2 Changed 5 years ago by ffidelis@…

You are correct. Trac version is 0.10.

I replace the line 97 of HudsonTracPlugin.py for your suggestion and reinstall egg file and the project's page load, but in 'Timeline' section appear other error as below:

  • in log:

2009-11-24 14:04:07,858 Trac[main] ERROR: argument to += must be iterable

  • in project's page

Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 387, in dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 237, in dispatch

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.3/site-packages/trac/Timeline.py", line 117, in process_request

available_filters += event_provider.get_timeline_filters(req)

TypeError: argument to += must be iterable

Any idea?

Changed 5 years ago by ffidelis@…

second error

comment:3 Changed 5 years ago by anonymous

Did you change lines 113 and 117 of HudsonTracPlugin.py too? They should
read

        if req.perm.has_permission('BUILD_VIEW'):

and

        if 'build' not in filters or not req.perm.has_permission('BUILD_VIEW'):

respectively.

comment:4 Changed 5 years ago by roadrunner

(In [7278]) Replace trac 0.11'ism for permission checking with a trac 0.10 compatible
version.

Addresses #6252.

comment:5 Changed 5 years ago by roadrunner

(In [7278]) Replace trac 0.11'ism for permission checking with a trac 0.10 compatible
version.

Addresses #6252.

comment:6 Changed 5 years ago by roadrunner

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

There has been no further feedback from submitter. So closing this,
as I believe it has been fixed.

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.