Modify

Opened 5 years ago

Closed 4 years ago

#5865 closed defect (fixed)

Error loading TracDependency

Reported by: yoheeb Owned by: okazaki
Priority: normal Component: TracDependencyPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I am getting an error in my trac log when trying to use this plugin:

blah blah...\trac-0.11.5stable_r8243-py2.5.egg\trac\web\chrome.py", line 392, in process_request

in provider.get_htdocs_dirs() if dir[0] == prefix]:

AttributeError: 'TracDependency' object has no attribute 'get_htdocs_dirs'

It seem to be also affecting other plugins, such as keyword suggest and tags. also.

Not sure if they have collided in their changed to the template files.

Attachments (0)

Change History (16)

comment:1 Changed 5 years ago by anonymous

  • Owner changed from okazaki to anonymous
  • Status changed from new to assigned

comment:2 Changed 5 years ago by okazaki

  • Owner changed from anonymous to okazaki
  • Status changed from assigned to new

comment:3 Changed 5 years ago by okazaki

(In [6607]) refs #5865

comment:4 Changed 5 years ago by okazaki

  • Status changed from new to assigned

Thank you for reporting. I added 'get_htdocs_dirs' attribute to TracDependencyClass.

comment:5 Changed 5 years ago by yoheeb

Cool, that was fast, thanks I'll have to try it out

comment:6 follow-up: Changed 5 years ago by anonymous

After installation, and attempting to enable the plugin, I get the following stacktrace error:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/api.py", line 339, in send_error
    'text/html')
  File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 683, in render_template
    template = self.load_template(filename, method=method)
  File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 659, in load_template
    self.templates = TemplateLoader(self.get_all_templates_dirs(),
  File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 406, in get_all_templates_dirs
    dirs += provider.get_templates_dirs()
  File "build/bdist.linux-i686/egg/tracdependency/tracdependency.py", line 142, in get_templates_dirs
    from pkg_resources import resource_filename
SystemError: Parent module 'tracdependency' not loaded

I think this is related.

comment:7 Changed 5 years ago by okazaki

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

If you still have this problem, please reopen this issue.

comment:8 Changed 5 years ago by anthony.groyer@…

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Summary changed from TracDependacny attribute error in log to Error loading TracDependency

I have also the same issue with latest source code: Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/api.py", line 377, in send_error

'text/html')

File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/chrome.py", line 738, in render_template

template = self.load_template(filename, method=method)

File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/chrome.py", line 704, in load_template

self.templates = TemplateLoader(self.get_all_templates_dirs(),

File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/chrome.py", line 440, in get_all_templates_dirs

dirs += provider.get_templates_dirs()

File "build/bdist.linux-i686/egg/tracdependency/tracdependency.py", line 142, in get_templates_dirs

from pkg_resources import resource_filename

SystemError: Parent module 'tracdependency' not loaded

comment:9 in reply to: ↑ 6 Changed 5 years ago by anonymous

Replying to anonymous:

Oh, sorry, I did not realize that I overlooked your comment.

comment:10 Changed 5 years ago by anonymous

I have the same problem when installing tracdependency plugin SystemError: Parent module 'tracdependency' not loaded

comment:11 Changed 5 years ago by anonymous

same problem here, I have downloaded and compiled tracdependencyplugin-r7842.

I have deployed the egg with easy_install TracDependencyPlugin-0.11.1.18-py2.5.egg command or installed from source python setup.py install

enabled the plugin from web ui admin, but get the error above, plz give some hint to fox the problem

thanks

comment:12 Changed 4 years ago by okazaki

  • Status changed from reopened to new

comment:13 Changed 4 years ago by anonymous

  • Owner changed from okazaki to anonymous
  • Status changed from new to assigned

comment:14 Changed 4 years ago by okazaki

  • Owner changed from anonymous to okazaki
  • Status changed from assigned to new

comment:15 Changed 4 years ago by okazaki

(In [8040]) refs #5865

comment:16 Changed 4 years ago by okazaki

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

Add Comment

Modify Ticket

Action
as closed The owner will remain okazaki.
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.