Opened 11 months ago
Closed 3 months ago
#14257 closed defect (fixed)
Python error with boxes in TRAC 1.6
Reported by: | clemens | Owned by: | Mikael Relbe |
---|---|---|---|
Priority: | normal | Component: | WikiExtrasPlugin |
Severity: | normal | Keywords: | |
Cc: | clemens | Trac Release: | 1.6 |
Description
WikiExtrasPlugin has an problem with TRAC 1.6.
I have been using the great WikiExtrasPlugin under TRAC 1.4 for many years.
Now after upgrading to TRAC 1.6 it does not run anymore.
Might be a problem with the "boxes" component (boxes.py
).
I am running the current version "1.3.2dev" i.e. revision r18475 of the plugin which is marked as "compatible with Python 3". My TRAC is the current 1.6 release, running under Linux (Debian 12) with Python 3.11.
Error message is logged as follows:
Trac[main] ERROR: [127.0.0.1] Internal Server Error: <RequestWithSession "GET '/wikiextras/dynamicboxes.css'">, referrer 'http://localhost:8000/first/' Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/trac/web/main.py", line 609, in dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python3.11/dist-packages/trac/web/main.py", line 301, in dispatch raise e File "/usr/local/lib/python3.11/dist-packages/trac/web/main.py", line 247, in dispatch resp = chosen_handler.process_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/tracwikiextras/boxes.py", line 144, in process_request req.send(csstext, 'text/css', status=200) File "/usr/local/lib/python3.11/dist-packages/trac/web/api.py", line 875, in send self._send(content, content_type, status) File "/usr/local/lib/python3.11/dist-packages/trac/web/api.py", line 1011, in _send self.write(content) File "/usr/local/lib/python3.11/dist-packages/trac/web/api.py", line 971, in write raise ValueError("Can't send str content") ValueError: Can't send str content
Please note the boxes.py
in above error message.
I found out that disabling the "boxes" component in WikiExtrasPlugin in trac.ini
make the problem disappear.
Hence I believe that there seems to be a problem with the "boxes" component.
[components] ... tracwikiextras.phrases.aboutwikiphrases = enabled tracwikiextras.phrases.phrases = enabled tracwikiextras.boxes.aboutwikiboxes = disabled tracwikiextras.boxes.boxes = enabled <<<<<<< "disabled" makes the problem go away tracwikiextras.color.color = enabled tracwikiextras.entities.entities = disabled tracwikiextras.icons.aboutwikiicons = disabled tracwikiextras.icons.icons = disabled tracwikiextras.icons.showicons = disabled tracwikiextras.icons.smileys = disabled tracwikiextras.symbols.symbols = disabled tracwikiextras.unc_paths.uncpathlink = disabled
Attachments (0)
Change History (5)
comment:1 Changed 11 months ago by
Cc: | clemens added |
---|
comment:2 follow-up: 3 Changed 11 months ago by
comment:3 Changed 11 months ago by
Replying to Jun Omae:
The patch works. The error is gone. Good!
(Sorry for late reply. Currently I cannot receive e-mail notifications about ticket changes from Trac-Hacks. See my question in the mailing list...)
Clemens
comment:4 Changed 3 months ago by
comment:5 Changed 3 months ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Try the following patch:
tracwikiextras/boxes.py