Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Should TracLogViewer 0.4 work with Trac 1.6?

30 views
Skip to first unread message

Joost Kraaijeveld

unread,
Dec 24, 2024, 8:55:51 AM12/24/24
to trac-...@googlegroups.com
Hi,

As the subject says: should TracLogViewer 0.4 work with Trac 1.6?

I did the following to get it working:
1. I have checked out the source, ran "python setup.py build" and
copied the resulting TracLogViewer.egg-info into the plugins directory
of my Trac. 
2. I added "logviewer.* = enabled" to the components section of my
trac.ini.
3. I also added 
"[logviewer]
autoload = false
autotail = 1000
autolevel = 3
autoup = true" to my trac.ini

It looks that the plugin is found when I look at the log file:
2024-12-24 14:01:36,763 Trac[env] INFO: -------------------------------
- environment startup [Trac 1.6] --------------------------------
2024-12-24 14:01:36,776 Trac[loader] DEBUG: Adding plugin
"TracLogViewer 0.4.dev0" from "/var/lib/tracenvs/trac/plugins"

But nothing is added to my Administration screen.

Anyone any idea?


--
Groeten,

Joost Kraaijeveld

signature.asc

Jun Omae

unread,
Dec 24, 2024, 9:39:18 AM12/24/24
to trac-...@googlegroups.com
Hi,

Try to copy *.egg file in the `dist` directory to the plugins directory after running `setup.py bdist_egg`, instead of *.egg-info directory.



--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/trac-users/76bbd93040fc8938e56aa10f60fe525978a300af.camel%40Askesis.nl.

Joost Kraaijeveld

unread,
Dec 24, 2024, 9:54:52 AM12/24/24
to trac-...@googlegroups.com
On Tue, 2024-12-24 at 23:38 +0900, Jun Omae wrote:
> Hi,
>
> Try to copy *.egg file in the `dist` directory to the plugins
> directory
> after running `setup.py bdist_egg`, instead of *.egg-info directory.

Now I have the menu item. Clicking on it results in an error:

Oops...
Trac detected an internal error:
AttributeError: 'NoneType' object has no attribute 'setdefault'

Python traceback
Most recent call last:

File "/usr/lib/python3/dist-packages/trac/web/main.py", line 609, in
dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python3/dist-packages/trac/web/main.py", line 301, in
dispatch
raise e
File "/usr/lib/python3/dist-packages/trac/web/main.py", line 263, in
dispatch
metadata.setdefault('iterable', chrome.use_chunked_encoding)


FWIW: during the build process I got 2 warnings that may be relevant?
1. /usr/lib/python3/dist-packages/setuptools/command/build_py.py:212:
_Warning: Package 'logviewer.htdocs.css' is absent from the `packages`
configuration.
2. /usr/lib/python3/dist-packages/setuptools/command/build_py.py:212:
_Warning: Package 'logviewer.templates' is absent from the `packages`
configuration.


--
Groeten,

Joost Kraaijeveld

Jun Omae

unread,
Dec 24, 2024, 1:39:27 PM12/24/24
to trac-...@googlegroups.com
It seems to be caused by line 119 in web_ui.py:

-        return 'logviewer.html', data, None
+       return 'logviewer.html', data

Jun Omae <jun...@gmail.com> (大前 潤)
--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.

Jun Omae

unread,
Dec 24, 2024, 1:47:54 PM12/24/24
to trac-...@googlegroups.com
Ah, I found https://trac-hacks.org/ticket/13816. The plugin doesn't work with Trac 1.4 and 1.6 because porting to Jinja2 templates is incomplete.


Jun Omae <jun...@gmail.com> (大前 潤)

Jun Omae

unread,
Dec 24, 2024, 4:48:33 PM12/24/24
to trac-...@googlegroups.com
On 2024/12/24 23:54, 'Joost Kraaijeveld' via Trac Users wrote:
> Now I have the menu item. Clicking on it results in an error:
>
> Oops...
> Trac detected an internal error:
> AttributeError: 'NoneType' object has no attribute 'setdefault'
>
> Python traceback
> Most recent call last:
>
> File "/usr/lib/python3/dist-packages/trac/web/main.py", line 609, in
> dispatch_request
> dispatcher.dispatch(req)
> File "/usr/lib/python3/dist-packages/trac/web/main.py", line 301, in
> dispatch
> raise e
> File "/usr/lib/python3/dist-packages/trac/web/main.py", line 263, in
> dispatch
> metadata.setdefault('iterable', chrome.use_chunked_encoding)
>
>
> FWIW: during the build process I got 2 warnings that may be relevant?
> 1. /usr/lib/python3/dist-packages/setuptools/command/build_py.py:212:
> _Warning: Package 'logviewer.htdocs.css' is absent from the `packages`
> configuration.
> 2. /usr/lib/python3/dist-packages/setuptools/command/build_py.py:212:
> _Warning: Package 'logviewer.templates' is absent from the `packages`
> configuration.

I just fixed the issues. Please try the latest from https://trac-hacks.org/svn/logviewerplugin/trunk and feedback!

--

Joost Kraaijeveld

unread,
Dec 25, 2024, 4:32:26 AM12/25/24
to trac-...@googlegroups.com
It works! Problem solved.

Thanks!

--
Groeten,

Joost Kraaijeveld

Reply all
Reply to author
Forward
0 new messages