Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3385 closed defect (fixed)

object has no attribute 'get_htdocs_dirs'

Reported by: didley@… Owned by: Prentice Wongvibulsin
Priority: low Component: TracTicketStatsPlugin
Severity: major Keywords: 0.12dev
Cc: Trac Release: 0.11


Now I installed Clearsilver in my trac 0.12dev. After this I got a screen with a headline "Ticket Statistics" and a footer with different fields 'start date', 'end date' etc. . But there is no chart in it.

The log file contains:

2008-07-14 19:27:11,404 Trac[main] ERROR: 'TicketStatsPlugin' object has no attribute 'get_htdocs_dirs'
Traceback (most recent call last):
  File "d:\programme\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\web\", line 447, in _dispatch_request
  File "d:\programme\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\web\", line 206, in dispatch
    resp = chosen_handler.process_request(req)
  File "D:\Programme\Python25\lib\site-packages\trac-0.12dev-py2.5.egg\trac\web\", line 372, in process_request
    in provider.get_htdocs_dirs() if dir[0] == prefix]:
AttributeError: 'TicketStatsPlugin' object has no attribute 'get_htdocs_dirs'


Attachments (0)

Change History (5)

comment:1 Changed 9 years ago by didley@…

When I use IE as browser it works. I can see a chart. The logfile contains the same error.

But if I use Firefoxe i cant see a chart.

comment:2 Changed 9 years ago by Prentice Wongvibulsin

Keywords: 0.12dev added
Priority: normallow
Severity: normalmajor
Status: newassigned

Thanks for continuing to provide me with useful debug information. I will look into fixing this problem. However, keep in mind that this plugin was developed for Trac 0.11, I can not test the plugin in your environment 0.12dev.

comment:3 Changed 9 years ago by devdan

0.11 Error Message:

Traceback (most recent call last):
  File "/usr/bin/trac-admin", line 7, in ?
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/admin/", line 1249, in run
    return admin.onecmd(command)
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/admin/", line 104, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "/usr/lib/python2.4/", line 219, in onecmd
    return func(arg)
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/admin/", line 1175, in do_deploy
    paths = list(provider.get_htdocs_dirs())
AttributeError: 'TicketStatsPlugin' object has no attribute 'get_htdocs_dirs'

You get this error when you use the command "trac-admin <projenv> deploy <target>" (to build static resources

If I want to manage my static content with apache I need to disable the plugin.

comment:4 Changed 9 years ago by l.vahl

Resolution: fixed
Status: assignedclosed

just add these 2 lines in your TicketStatsPlugin class (Line 41)

def get_htdocs_dirs(self):


and it is fixed...

I can't attach my file, because I changed the qrys for my stats

comment:5 Changed 8 years ago by anonymous

this then gives something like

 TypeError: 'NoneType' object is not iterable

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Prentice Wongvibulsin.
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.