Modify

Opened 6 years ago

Closed 5 years ago

#12301 closed defect (fixed)

Exception: testmanager.listRootCatalogs: object of type 'type' has no len()

Reported by: roman.gerhardt@… Owned by: Roberto Longobardi
Priority: normal Component: TestManagerForTracPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

How to Reproduce

While doing a GET operation on /rpc, Trac issued an internal error.

If I deaktivate the TestManagerRPC Component the GET operation on '/rpc' works fine

Request parameters:

{}

User agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0

System Information

Trac 1.0.5
Genshi 0.7 (with speedups)
pysqlite 2.6.0
Python 2.7.5 (default, Jun 17 2014, 18:11:42)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)]
RPC 1.1.2
setuptools 0.9.8
SQLite 3.7.17
jQuery 1.7.2
jQuery UI 1.8.21
jQuery Timepicker 1.0.1

Enabled Plugins

graphviz 0.7.7dev
siteupload 0.11
Table-Sorter-Plugin 1.0
TestManager 1.8.2
TracForms 0.5dev
TracGenericClass 1.1.6
TracGenericWorkflow 1.0.5
TracIniAdminPanel 1.0.1
TracXMLRPC 1.1.2

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/Trac-1.0.5-py2.7.egg/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.7/site-packages/Trac-1.0.5-py2.7.egg/trac/web/main.py", line 222, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.7/site-packages/TracXMLRPC-1.1.2-py2.7.egg/tracrpc/web_ui.py", line 72, in process_request
    return self._dump_docs(req)
  File "/usr/lib/python2.7/site-packages/TracXMLRPC-1.1.2-py2.7.egg/tracrpc/web_ui.py", line 111, in _dump_docs
    str(e), out.getvalue()))
Exception: testmanager.listRootCatalogs: object of type 'type' has no len()
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/TracXMLRPC-1.1.2-py2.7.egg/tracrpc/web_ui.py", line 101, in _dump_docs
    (method.signature,
  File "/usr/lib/python2.7/site-packages/TracXMLRPC-1.1.2-py2.7.egg/tracrpc/api.py", line 230, in _get_signature
    if len(sig) < len(sigcand):
TypeError: object of type 'type' has no len()

Attachments (0)

Change History (8)

comment:1 Changed 6 years ago by Ryan J Ollos

Summary: Exception: testmanager.listRootCatalogs: object of type 'type' has no len()Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/TracXMLRPC-1.1.2-py2.7.egg/tracrpc/web_ui.py", line 101, in _dump_docs (method.signature, File "/usr/lib/python2.7/site-packages/TracXMLRPC-1.1.2-py2.7.egg/tracrpc/api.py", line 230, in _get_signature if len(sig) < len(sigcand):TypeError: object of type 'type' has no len()Exception: testmanager.listRootCatalogs: object of type 'type' has no len()

comment:2 Changed 6 years ago by anonymous

Hide API link

[metanav]
rpc = disabled

comment:3 Changed 5 years ago by michal.somol@…

Hello guys,

I encountered exactly the same problem (only newer config) and below mentioned hint didn't help, is there another possibility? I am below posting our config + error, as this issue is not closed I am replying here.

System Information

Trac 1.0.12
Babel 2.3.4
dnspython 1.14.0
Genshi 0.7 (without speedups)
mod_wsgi 3.4 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
MySQL server: "10.1.14-MariaDB", client: "5.5.50-MariaDB", thread-safe: 1
MySQLdb 1.2.3
Pillow 2.0.0
Pygments 1.4
Python 2.7.5 (default, Aug 18 2016, 15:58:25)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
pytz 2016.6.1
RPC 1.1.5
setuptools 0.9.8
Subversion 1.7.14 (r1542130)
jQuery #JQUERY#
jQuery UI #JQUERYUI#
jQuery Timepicker #JQUERYTP#

Enabled Plugins

SequenceDiagram 1.0
TestManager 1.9.0
TracAccountManager 0.4.4
TracGenericClass 1.1.6
TracGenericWorkflow 1.0.5
TracSpamFilter 1.0.9dev
TracSumFields 1.0.1
TracXMLRPC 1.1.5

Trac detected an internal error:

Exception: testmanager.listRootCatalogs: object of type 'type' has no len()
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/TracXMLRPC-1.1.5-py2.7.egg/tracrpc/web_ui.py", line 101, in _dump_docs
    (method.signature,
  File "/usr/lib/python2.7/site-packages/TracXMLRPC-1.1.5-py2.7.egg/tracrpc/api.py", line 230, in _get_signature
    if len(sig) < len(sigcand):
TypeError: object of type 'type' has no len()
Last edited 5 years ago by Jun Omae (previous) (diff)

comment:4 Changed 5 years ago by Jun Omae

I guess TestManagerRPC.xmlrpc_methods() has this issue.

Please try to disable testmanager.rpcsupport.* like this if you don't use RPC support in testmanager:

[components]
testmanager.rpcsupport.* = disabled

Or try to apply the following patch to testmanager/rpcsupport.py:

  • testmanager/rpcsupport.py

    old new  
    4747            yield ('TEST_VIEW', ((list, str),), self.getTestCatalog)
    4848            yield ('TEST_VIEW', ((list, str),(list, str, str)), self.getTestCase)
    4949            yield ('TEST_VIEW', ((list, str, str),), self.getTestPlan)
    50             yield ('TEST_VIEW', ((list),), self.listRootCatalogs)
     50            yield ('TEST_VIEW', ((list,),), self.listRootCatalogs)
    5151            yield ('TEST_VIEW', ((list, str),), self.listSubCatalogs)
    5252            yield ('TEST_VIEW', ((list, str),), self.listTestPlans)

comment:5 Changed 5 years ago by anonymous

Hello jun66j5, thanks for the very quick reply, I will try it next week.

comment:6 Changed 5 years ago by michal.somol@…

Hello jun66j5,

the fix you proposed works as miracle, thank you so much! Ticket can be closed, I didn't figure out how I could do this. M.

comment:7 Changed 5 years ago by Roberto Longobardi

Thanks a lot for the patch.

Included in release 1.9.1 now available from SourceForge.

https://sourceforge.net/projects/testman4trac/files

comment:8 Changed 5 years ago by Roberto Longobardi

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Roberto Longobardi.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.