Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#314 closed defect (fixed)

Crash with tBlog 0.2 running under 0.9.4

Reported by: anonymous Owned by: John Hampton
Priority: high Component: TracBlogPlugin
Severity: major Keywords:
Cc: Radoslaw Stachowiak Trac Release: 0.9

Description

I have TracTags 0.3.1 working under Trac 0.9.4. Just installing tBlog-0.2-py2.3.egg in /plugins, crashes when displaying trac home as:

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.

Error 500

localhost Fri Apr 14 19:28:33 2006 Apache/2.2.0 (Unix) PHP/5.1.2 SVN/1.3.1 mod_python/3.2.8 Python/2.3.5 mod_ssl/2.2.0 OpenSSL/0.9.8a DAV/2

No output in log/trac.log,

Attachments (0)

Change History (7)

comment:1 Changed 18 years ago by Alec Thomas

Component: TracHacksTracBlogPlugin
Owner: changed from Alec Thomas to John Hampton

Please don't log tickets against the TracHacks component. Use the component corresponding to the hack you have an issue with (in this case TracBlogPlugin), otherwise the plugin author will not be aware of the ticket.

comment:2 Changed 18 years ago by anonymous

tBlog-0.2-py2.3.egg ran fine, once trac was upgraded to 0.10dev from trac SVN trunk.

comment:3 Changed 18 years ago by anonymous

Cc: Radoslaw Stachowiak added; anonymous removed

the same here, does not work with 0.9.4

comment:4 Changed 18 years ago by John Hampton

Status: newassigned

Could some throw me a bone here? I'll try testing it against 0.9.4 tomorrow, but last time I tried, it worked. So, would you please provide me with:

  • [components] section of trac.ini
  • [trac] section of trac.ini
  • Contents of apache log when error occurs
  • Contents of trac.log. Specifically proof that that plugin is being loaded and any tracebacks that may exist
  • Try using tracd and post any errors

Thanks :)

comment:5 Changed 18 years ago by Radoslaw Stachowiak

trac.ini

[components]
tractags.* = enabled
trac.wiki.web_ui.wikimodule = disabled
webadmin.* = enabled
tracblog.* = enabled

[trac]
default_charset = iso-8859-15
ignore_auth_case = false
permission_store = DefaultPermissionStore
check_auth_ip = true
database = sqlite:db/trac.db
templates_dir = /usr/share/trac/templates
default_handler = TagsWikiModule
metanav = login,logout,settings,help,about
htdocs_location = /mlot/trac/
mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search
repository_dir = /svn

ERROR on the web:

Oops...

Trac detected an internal error:

TracWebAdmin

Traceback (most recent call last):
  File "/home/radek/www/moja.poziomka.pl/cgi-bin/trac.cgi", line 20, in ?
    cgi_frontend.run()
  File "/usr/lib/python2.4/site-packages/trac/web/cgi_frontend.py", line 123, in run
    env = get_environment(req, os.environ, threaded=False)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 335, in get_environment
    return _open_environment(env_path, threaded)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 44, in _open_environment
    return open_environment(env_path)
  File "/usr/lib/python2.4/site-packages/trac/env.py", line 374, in open_environment
    env = Environment(env_path)
  File "/usr/lib/python2.4/site-packages/trac/env.py", line 86, in __init__
    load_components(self)
  File "/usr/lib/python2.4/site-packages/trac/loader.py", line 77, in load_components
    entry_point.load()
  File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1829, in load
    if require: self.require(env, installer)
  File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1842, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 483, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
DistributionNotFound: TracWebAdmin

Apache log containt nothing interesting: a.b.c.d - - [17/Apr/2006:16:01:16 +0200] "GET /mlot/admin/general/plugin HTTP/1.1" 200 1384

trac.log it does not grow on error - that strange, means that error is quite early i think.

comment:6 Changed 18 years ago by John Hampton

Thank you very much for the info. It really helps.

The reason that you are getting this error is because 0.9.x has no method for handling plugin dependencies. TracBlogPlugin uses methoeds and interfaces from both the TagsPlugin and the WebAdmin plugins. Therefore, those plugins need to load before the TracBlogPlugin loads. To enable this in 0.10, a setuptools check has been added which allows 0.10 to load the dependencies prior to loading the TracBlogPlugin. The result in 0.9.x is what you see, because it doesn't support that.

The solution is to simply install both the TagsPlugin and the WebAdmin plugin globally via:

# python setup.py install

Instead of putitng an egg in the plugins dir. If you really like eggs, then simply placing the .egg files of those plugins in your python site-packages dir should work, though I haven't tested that method.

I also updated the installation instructions on the TracBlogPlugin page to reflect this problem so that others won't have as hard a time. Thanks for the bug report.

Finally, somewhere along the line, the TracBlogPlugin module name changed from tracblog to tBlog, so you should probably update your trac.ini to tBlog.* = enabled, though if you're placing the TracBlogPlugin egg int he plugins dir, then this is not necessary.

Please try out the solution and then close this bug if it works.

comment:7 Changed 18 years ago by Radoslaw Stachowiak

Resolution: fixed
Status: assignedclosed

Thank You very much for help. It solved my problem.

Based on information from You I choosed addind new directory to my PYTHONPATH (in face put using setenv in apache) and put there tblog egg.

However what happend is that this PYTHONPATH is imported at first (earlier than trac plugins/ directory) so i had to put webadmin and tags eggs in my new PYTHONPATH dir, and leave other eggs (with tblog) in standard plugins directory which is loaded later. Such setup works fine.

One thing, under trac admin in manage plugins screen tBlog does not contain meta informaiton (author,licence, web, descr) all are marked as UNKNOWN. Not known to me what is the reason.

Anyway, for me case is solved, thank You kindly for Your help.

Modify Ticket

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