Modify

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#3385 closed defect (fixed)

object has no attribute 'get_htdocs_dirs'

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

Description

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\main.py", line 447, in _dispatch_request
    dispatcher.dispatch(req)
  File "d:\programme\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\web\main.py", 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\chrome.py", line 372, in process_request
    in provider.get_htdocs_dirs() if dir[0] == prefix]:
AttributeError: 'TicketStatsPlugin' object has no attribute 'get_htdocs_dirs'

didley

Attachments (0)

Change History (5)

comment:1 Changed 6 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 6 years ago by echo0101

  • Keywords 0.12dev added
  • Priority changed from normal to low
  • Severity changed from normal to major
  • Status changed from new to assigned

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 6 years ago by devdan

0.11 Error Message:

Traceback (most recent call last):
  File "/usr/bin/trac-admin", line 7, in ?
    sys.exit(
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/admin/console.py", line 1249, in run
    return admin.onecmd(command)
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/admin/console.py", line 104, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "/usr/lib/python2.4/cmd.py", line 219, in onecmd
    return func(arg)
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/admin/console.py", 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 http://trac.edgewall.org/wiki/TracCgi#MappingStaticResources).

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

comment:4 Changed 6 years ago by l.vahl

  • Resolution set to fixed
  • Status changed from assigned to closed

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

def get_htdocs_dirs(self):

return

and it is fixed...

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

comment:5 Changed 5 years ago by anonymous

this then gives something like

 TypeError: 'NoneType' object is not iterable

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.