Ticket #3362 (reopened defect)

Opened 5 months ago

Last modified 2 months ago

Unknown encoding error with TracDownloader, Trac 0.11, Py 2.5

Reported by: olemis Assigned to: peca
Priority: highest Component: TracDownloaderPlugin
Severity: critical Keywords: encoding 0.11 TracDownloaderPlugin
Cc: Trac Release: 0.11

Description

Environment : PIL 1.1.6, PyCaptcha? 0.4, TracDownloader?, Trac 0.11, tracd, Python 2.5, Windows XP

Task : To install the TracDownloader? plugin

Problem : After the installation (either with through web admin, or directly from the command line), once the server (tracd) is restarted and tries to load the aforementioned plugin, the following exception is raised :

Traceback (most recent call last):

File "C:\Program Files\Python\2.5\Lib\site-packages\trac\web\api.py", line 339, in send_error

'text/html')

File "C:\Program Files\Python\2.5\Lib\site-packages\trac\web\chrome.py", line 684, in render_template

data = self.populate_data(req, data)

File "C:\Program Files\Python\2.5\Lib\site-packages\trac\web\chrome.py", line 592, in populate_data

dchrome?.update(req.chrome)

File "C:\Program Files\Python\2.5\Lib\site-packages\trac\web\api.py", line 168, in getattr

value = self.callbacks[name](self)

File "C:\Program Files\Python\2.5\Lib\site-packages\trac\web\chrome.py", line 460, in prepare_request

for category, name, text in contributor.get_navigation_items(req):

File "build\bdist.win32\egg\tracdownloader\web_ui.py", line 53, in get_navigation_items

self.env.href.downloader())

LookupError?: unknown encoding: /siscont/downloader

Attachments

Change History

07/10/08 10:40:39 changed by olemis

Tip... the word siscont displayed in the traceback report, is the name of the project environment (folder)

07/27/08 05:01:13 changed by anonymous

Almost same on ubuntu 8.04

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/api.py", line 339, in send_error
    'text/html')
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/chrome.py", line 684, in render_template
    data = self.populate_data(req, data)
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/chrome.py", line 592, in populate_data
    d['chrome'].update(req.chrome)
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/api.py", line 168, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/chrome.py", line 460, in prepare_request
    for category, name, text in contributor.get_navigation_items(req):
  File "build/bdist.linux-i686/egg/tracdownloader/web_ui.py", line 53, in get_navigation_items
    self.env.href.downloader())
LookupError: unknown encoding: /downloader

08/04/08 08:51:00 changed by izzy

Until you find a solution, here is a possible work-around: I guess the reason for the failing install will be similar to what happens with Trac 0.10 and TracDownloaderPlugin install - a dependency cannot be resolved. PyCaptcha? I could only find for up to Python 2.4! So if you can live without the Captcha (and have it disabled), you may just remove it from the dependencies in the setup.py script - simply remove the lines

  """install_requires = ['PyCAPTCHA >= 0.4',
                      'PIL >= 1.1.5'],"""

The dependency for PIL you already have provided, according to your post :)

I cannot guarantee that this works for you - though it worked for me, the error message looked a bit different...

(follow-up: ↓ 5 ) 08/06/08 10:40:49 changed by anonymous

See #3338. Mitigates the problem so pages render. Plugin still broken, however.

(in reply to: ↑ 4 ) 09/19/08 14:38:15 changed by olemis

  • status changed from new to closed.
  • resolution set to fixed.

Replying to anonymous:

See #3338. Mitigates the problem so pages render. Plugin still broken, however.

This does not work for me :(

However I did this ...

--- C:\Program Files\Python\2.5\Lib\site-packages\TracDownloader-0.1-trac-0.11.egg\tracdownloader\web_ui_bad.py Fri Sep 19 15:15:02 2008
+++ C:\Program Files\Python\2.5\Lib\site-packages\TracDownloader-0.1-trac-0.11.egg\tracdownloader\web_ui.py Thu Sep 18 18:54:23 2008
@@ -49,7 +49,7 @@
     def get_navigation_items(self, req):
         """Downloader isinstance visible if user hasattr got permission """
         if req.perm.has_permission('DOWNLOADER_DOWNLOAD'):
-            yield 'mainnav', 'downloader', Markup('<a href="%s">Downloader</a>' ,
+            yield 'mainnav', 'downloader', Markup('<a href="%s">Downloader</a>' %
                                              self.env.href.downloader())

     # IRequestHandler methods

and it works

10/14/08 03:37:02 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

olemis patch is not yet applied in 0.11 version of web_ui.py in r4492


Add/Change #3362 (Unknown encoding error with TracDownloader, Trac 0.11, Py 2.5)




Change Properties
Action