Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10563 closed defect (cantfix)

ImportError: No module named pydoc

Reported by: chaupv79@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.12
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Dear All, I have installed XML_RPC plugin to trac 0.12 but when I redirect to http://trac-domain/project/login/xmlrpc

there is an error as below:

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

(please provide additional details here)

Request parameters:

{}

User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1

System Information

Trac 0.12
Genshi 0.6
mod_python 3.2.8
pysqlite 2.3.3
Python 2.4.3 (#1, Sep 21 2011, 20:06:00)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)]
setuptools 0.6c11
SQLite 3.3.6
Subversion 1.6.11 (r934486)
jQuery 1.4.2

Enabled Plugins

TracXMLRPC 0.1

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/tracrpc/web_ui.py", line 35, in process_request
    for method in XMLRPCSystem(self.env).all_methods(req):
  File "/usr/lib/python2.4/site-packages/tracrpc/api.py", line 178, in all_methods
    c = Method(provider, *candidate)
  File "/usr/lib/python2.4/site-packages/tracrpc/api.py", line 71, in __init__
    import pydoc
ImportError: No module named pydoc

Attachments (0)

Change History (6)

comment:1 by Remy Blank, 12 years ago

Resolution: cantfix
Status: newclosed

PluginIssue (th:XmlRpcPlugin). But… the error message should be explicit enough, no?

comment:2 by osimons, 12 years ago

Not strictly a plugin issue though… This certainly seems like an install issue with your ancient Python 2.4.3 (6 years old) running on Red Hat 4.1 (7 years old). As the pydoc docs say, this module has been shipped in Python standard lib since Python 2.1, and why it is not available to you I cannot say.

Lastly, and most most likely the quickest fix, is that your plugins lists 'TracXMLRPC 0.1' which is at least 5 years old and certainly cannot be expected to be compatible with the new-ish Trac 0.12 that you have installed. That version was made for Trac ⇐ 0.10.x.

Follow the plugin link, check the docs, and try again.

comment:3 by Remy Blank, 12 years ago

Oh, somehow I managed to read "epydoc" instead of "pydoc", and wondered why it was needed in a component constructor. Sorry for the confusion.

comment:4 by chaupv79@…, 12 years ago

Thank for your suggestion

I have solved that problem like below:

I moved the code:

import pydoc

to the top of file (/usr/lib/python2.4/site-packages/tracrpc/api.py)

and restart apache /etc/init.d/httpd restart

comment:5 by osimons, 12 years ago

You would rather hack the old incompatible version and try to get it to work somehow, rather than update to the latest version that I've been working on for the last 5 years and is known to work fine with Trac 0.12? Current version is 1.1.2+ and is really what you should use too.

BTW, the import pydoc statement is no longer present anywhere in the plugin source code.

comment:6 by Chau Pham, 12 years ago

Thank you a lot,

you are right, I move "import pydoc" to the top of file, that isn't a good solution for some reference, I have reinstall xmlrpc version 1.1.2 and it works fine.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.