Edgewall Software

Ticket #7823 (new defect)

Opened 8 weeks ago

Last modified 12 days ago

import obfuscation

Reported by: tac@… Owned by:
Priority: low Milestone: 0.11.3
Component: web frontend/mod_python Version: 0.11.2
Severity: normal Keywords:
Cc: kasper@…, osimons

Description

I use in my external app

from trac.admin.console import TracAdmin

In trac 0.11.2 i get the errors: IRequestHandler not found.

I solved this issue by fixing

  • trac/attachment.py
      - from trac.web import HTTPBadRequest, IRequestHandler
      + from trac.web.api import HTTPBadRequest, IRequestHandler
    
  • trac/wiki/intertrac.py
      - from trac.web import IRequestHandler
      + from trac.web.api import IRequestHandler
    

I am open for every solution - i won't touch trac source. But trac.admin.console is otherwise not usable for me.

Attachments

Change History

Changed 8 weeks ago by rblank

  • version changed from none to 0.11.2
  • component changed from admin/web to admin/console

Could you please post the whole traceback for the "IRequestHandler not found" error, and possibly the part of your application where the exception happens?

Changed 8 weeks ago by osimons

Do you have mod_python installed and on Python path? I'm quite certain that is related to the current egg-trickery done in trac.web.__init__.py in order to handle zipped Genshi eggs through mod_python. I've seen that too, but according to jonas that code will be needed at least for a while still and it has seemed like the 'path of least problems'.

I suppose the faulty logic we both have hit here is that a) mod_python is installed b) we've arrived at trac.web outside regular request dispatching (trac.web.modpython_frontend never loaded). In that case the logic reads like the api classes will never actually get imported to their expected location in trac.web.

I don't have a solution to this as I haven't been involved in the workaround code. Hopefully it can be adjusted to accomodate more situations than just the plain request handling.

Changed 8 weeks ago by osimons

  • owner set to cmlenz
  • component changed from admin/console to web frontend/mod_python

Changed 8 weeks ago by osimons

  • owner cmlenz deleted

I thought we got rid of automatic component owners, but cmlenz was still on the mod_python component. Just been in Admin and removed him - please revert if there is some arrangement I'm unaware of.

Changed 12 days ago by kasper@…

  • cc kasper@… added

I am experiencing this too. I am creating a Django-based website and have been using presenting some of Trac's data which I have been using the Trac API's to present (wiki format etc.) but this is an absolute show stopper :-(

Changed 12 days ago by osimons

  • cc osimons added

Adding myself to cc list.

Add/Change #7823 (import obfuscation)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from (none). Next status will be 'new'
The owner will change from (none) to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.