Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#2631 closed defect (invalid)

Error message when TagsPlugin not installed

Reported by: izzy Owned by: Radek Bartoň
Priority: normal Component: ScreenshotsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

I don't have the TagsPlugin installed. As mentioned on the page, I added the line

tracscreenshots.tags.screenshotstags = disabled

to the projects trac.ini - with no effect. In 80% of the cases where I want to access the screenshots directly, I only get the red box with the message

No handler matched request to /Screenshots

The logfile says:

Trac[loader] WARNING: Cannot load plugin TracScreenshots.tags because it requires "TracTags"

trac.ini extract:

[components]
tracscreenshots.api.screenshotsapi = enabled
tracscreenshots.core.screenshotscore = enabled
tracscreenshots.init.screenshotsinit = enabled
tracscreenshots.matrix_view.screenshotsmatrixview = enabled
tracscreenshots.tags.screenshotstags = disabled
tracscreenshots.wiki.screenshotswiki = enabled

And yes, I reloaded (even restarted) the apache.

Details of my installation:

Trac 0.10.3 on Ubuntu Dapper Drake (06-06 LTS)
PIL: 1.1.5-4ubuntu1
Apache: 2.0.55-4ubuntu2.3 mit libapache2-mod-python2.4 3.1.4-0ubuntu1.1
Python: 2.4.2-0ubuntu3
sqlite3: 3.2.8-1ubuntu1

Besides: I even thought about installing the TagsPlugin just to get this working - but since the wiki page only mentions installation for Trac 0.11 (and I still run 0.10) I didn't install it...

Attachments (0)

Change History (7)

comment:1 Changed 17 years ago by izzy

Besides: The WebAdminPlugin does not even mention the screenshotstags component (while the other 5 show up in the plugin), so I had to put that line to the trac.ini manually. Still, it looks like it is ignored (I doubt a spelling error, since I added that line per cut'n'paste from the plugins page). The "funny" thing about the whole stuff is, that it sometimes works (and I don't know why) - so the above error only shows up most of the time, but not always...

Suggestion: Maybe there should be a check performed whether the TagsPlugin is available - and if not, the ScreenshotsPlugin should behave as if it was disabled?

comment:2 Changed 17 years ago by izzy

ARGH! Forget about - my mistake... I was using a link in the wiki to access the screenshots - and spelled the URL with an uppercase S ("/Screenshots" instead of "/screenshots") there. Guess I used that link in 80% of the cases - though I initially had these problems also when hitting the screenshots button in the main nav (where it sometimes even disappeared)...

comment:3 Changed 17 years ago by Radek Bartoň

Resolution: invalid
Status: newclosed

I thought that, but at least you convinced me to hide "Additional tags" add form field when tags are disabled.

comment:4 Changed 17 years ago by izzy

Resolution: invalid
Status: closedreopened

Blackhex: I'm afraid I have to re-open this ticket. Still I get error messages in the logfiles even for projects where the plugin is not enabled: Every access produces

Trac[loader] WARNING: Cannot load plugin TracScreenshots.tags because it requires "TracTags"

in the logfile (and as I already stated before: I explicitely disabled it in trac.ini since I could not do so via WebAdminPlugin). Despite of that fact, the plugin seems to work (where enabled; which seems logical, since according to the log only the tags extension could not be loaded - which should not be loaded since I disabled it). But in those projects the plugin is enabled for, the error message sometimes is followed by:

2008-02-24 23:09:21,407 Trac[loader] WARNING: Cannot load plugin TracScreenshots.tags because it requires "TracTags"
2008-02-24 23:09:21,526 Trac[api] WARNING: HTML preview using <trac.mimeview.silvercity.SilverCityRenderer object at 0xb4bd1fec> failed (No module named SilverCity)
Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/trac/mimeview/api.py", line 448, in render
    filename, url)
  File "/var/lib/python-support/python2.4/trac/mimeview/silvercity.py", line 93, in render
    import SilverCity
ImportError: No module named SilverCity
2008-02-24 23:09:21,533 Trac[api] WARNING: HTML preview using <trac.mimeview.enscript.EnscriptRenderer object at 0xb4bd1aac> failed (Running (enscript --color -h -q --language=html -p - -Ehtml) failed: 127, sh: enscript: command not found.)
Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/trac/mimeview/api.py", line 448, in render
    filename, url)
  File "/var/lib/python-support/python2.4/trac/mimeview/enscript.py", line 142, in render
    raise Exception, err
Exception: Running (enscript --color -h -q --language=html -p - -Ehtml) failed: 127, sh: enscript: command not found.

I'm not sure whether this is connected (comparing logfiles showed that this message just comes up when somebody browses the SVN repository of the project and hits some file with an extention trac seems not sure how to handle; it happens e.g. for *.sh, but not for *.txt) - I even doubt it, but just in case and since it is so close up to the other error message...

Again: The plugin itself seems to work - I didn't see any error message on the web browser recently. Just a bunch of those error messages quoted above in the log file. I even added

TracScreenshots.tags.* = disabled

to trac.ini - no changes.

comment:5 Changed 17 years ago by Radek Bartoň

Resolution: invalid
Status: reopenedclosed

First warning is caused because I'm using conditional dependencies in setup.py even if Trac 0.10 didn't support them yet. There is nothing wrong about this but if you really whan to get rid of it change:

@setup.py:17
-    'TracScreenshots.tags = tracscreenshots.tags [Tags]']},
+    'TracScreenshots.tags = tracscreenshots.tags},

Second message is telling you that you don't have SilverCity library installed. This library can do advanced syntax highlighting in HTML previews but default syntax highlighting is good enough in most cases.

Third message is the same for Enscript which is another syntax highlighting tool.

I'm not sure how to disable these errors but I suppose that installing at leas one of them would do the job but better consult Trac's documentation or code.

comment:6 Changed 17 years ago by izzy

Thank you - just installed enscript (because this just involved "apt-get install enscript" and no further steps), so the 3rd error message is gone (at least up to now). Guess I simply ignore the other two - as long as it is nothing critical (and it looks like running fine). If I'ld change that line in setup.py I had to redo this on all updates - and I doubt I'll always remember ;)

Thank you for your help!

comment:7 Changed 17 years ago by izzy

Just an additional comment for those with Trac 0.10 who want to install the TagsPlugin:

easy_install http://trac-hacks.org/svn/tagsplugin/tags/0.4.1/

All newer versions already depend on Genshi, so this is the latest one working for Trac 0.10.x "out of the box".

Modify Ticket

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