#4361 closed defect (fixed)
Enabling plugin causes SystemError: Parent module 'repository_hook_system' not loaded
Reported by: | anonymous | Owned by: | Jeff Hammel |
---|---|---|---|
Priority: | high | Component: | RepositoryHookSystemPlugin |
Severity: | critical | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
I just installed this plugin. Immediately after enabling the plugin trac dies with the following traceback:
Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/web/api.py", line 367, in send_error 'text/html') File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 687, in render_template template = self.load_template(filename, method=method) File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 663, in load_template self.templates = TemplateLoader(self.get_all_templates_dirs(), File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 410, in get_all_templates_dirs dirs += provider.get_templates_dirs() File "/usr/lib/python2.5/site-packages/RepositoryHookSystem-0.1-py2.5.egg/repository_hook_system/admin.py", line 55, in get_templates_dirs from pkg_resources import resource_filename SystemError: Parent module 'repository_hook_system' not loaded}}}
Attachments (0)
Change History (12)
comment:1 Changed 16 years ago by
comment:3 Changed 16 years ago by
I tried variations on the TracPluginshttp://trac.edgewall.org/wiki/TracPlugins installation page
I just now completely uninstalled it then reinstalled it by dl zipped source and building it with "python setup.py bdist_egg" then copying the egg into my plugins dir under my trac instance. I have also done a variation on that "python setup.py install"
still the final system error is the same.
comment:5 Changed 16 years ago by
Reproduced.
Reproduction steps:
(using virtualenv)
- from the command line:
virtualenv trac cd trac . bin/activate mkdir src cd src svn co http://trac-hacks.org/svn/traclegosscript/anyrelease/ TracLegos cd TracLegos python setup.py develop cd example/oss python setup.py develop cd - paster serve --reload development.ini
(Note: this is boilerplate)
- Go to http://127.0.0.1:8081
- Click Create Project
- Enter name and URL: foo, foo
- Click next and then create project
- restart paster (kill and then run above command again) this is necessary because the installed plugins are not loaded into python; need to work around this
trac-admin trac/src/TracLegos/projects/foo upgrade
- refresh page
- click register tab
- create an account
trac-admin src/TracLegos/projects/foo permission add <username> TRAC_ADMIN
- reload page, click admin tab
- in
src/
,svn co http://trac-hacks.org/svn/repositoryhooksystemplugin/0.11/ RepositoryHookSystem
cd RepositoryHookSystem/
python setup.py install
- restart paster/trac (again)
- click on plugins
- enable the
RepositoryHookSystem
plugin
Error Message:
Traceback (most recent call last): File "/home/jhammel/trac/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/api.py", line 367, in send_error 'text/html') File "/home/jhammel/trac/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/chrome.py", line 687, in render_template template = self.load_template(filename, method=method) File "/home/jhammel/trac/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/chrome.py", line 663, in load_template self.templates = TemplateLoader(self.get_all_templates_dirs(), File "/home/jhammel/trac/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/chrome.py", line 410, in get_all_templates_dirs dirs += provider.get_templates_dirs() File "/home/jhammel/trac/lib/python2.5/site-packages/RepositoryHookSystem-0.1-py2.5.egg/repository_hook_system/admin.py", line 55, in get_templates_dirs from pkg_resources import resource_filename SystemError: Parent module 'repository_hook_system' not loaded
(sorry for the verbosity, but wanted to give the whole procedure for posterity)
comment:6 Changed 16 years ago by
i notice that package data isn't included properly; will try to fix that and see if it helps
comment:7 follow-up: 8 Changed 16 years ago by
comment:8 Changed 16 years ago by
comment:9 Changed 16 years ago by
i also still don't understand the root cause of this error at all; my only current suspicion is my bad handling of __init__.py
, but its purely a far-fetched guess
comment:10 Changed 16 years ago by
think i fixed; trying to reproduce with above steps to make sure; still unsure what the issue was/is
comment:11 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
should be fixed now; again, not really sure where the error ultimately was
How is this plugin being installed? DL source + python setup.py install or direct DL of egg?