Ticket #6252 (assigned defect)

Opened 4 months ago

Last modified 3 months ago

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

Reported by: ffidelis@gmail.com Assigned to: roadrunner (accepted)
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

hudsonplugin_trac_0.10_error.jpg (127.9 kB) - added by ffidelis@gmail.com on 11/24/09 17:28:04.
second error

Change History

11/24/09 14:07:19 changed 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.

11/24/09 17:27:27 changed by ffidelis@gmail.com

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?

11/24/09 17:28:04 changed by ffidelis@gmail.com

  • attachment hudsonplugin_trac_0.10_error.jpg added.

second error

11/26/09 04:33:15 changed 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.

12/18/09 11:26:04 changed by roadrunner

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

Addresses #6252.

12/20/09 14:00:58 changed by roadrunner

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

Addresses #6252.


Add/Change #6252 (Hudons Trac Plugin: Trac[main] ERROR: iterable argument required)




Change Properties
Action