Ticket #3362 (closed defect: duplicate)

Opened 4 years ago

Last modified 4 months ago

[Patch] 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 (Last modified by rjollos)

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
    d['chrome'].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 17: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 12: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 15: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 17:40:49 changed by anonymous

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

(in reply to: ↑ 4 ) 09/19/08 21: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 10: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

(follow-up: ↓ 9 ) 02/09/11 11:04:41 changed by squalyl@gmail.com

Problem still present in r9844, please apply the patch

02/09/11 16:14:42 changed by rjollos

  • description changed.
  • summary changed from Unknown encoding error with TracDownloader, Trac 0.11, Py 2.5 to [Patch] Unknown encoding error with TracDownloader, Trac 0.11, Py 2.5.

(in reply to: ↑ 7 ) 02/09/11 16:17:27 changed by rjollos

Replying to squalyl@gmail.com:

Problem still present in r9844, please apply the patch

There is no activity in the timeline since 2008, so its unlikely the author is active. I will go ahead and apply the patch if we don't here from the author within 2 weeks, in accordance with the guidelines in AdoptingHacks.

Please send a reminder in 2 weeks if there is no response in this ticket from the author.

02/09/11 16:25:57 changed by rjollos

This is really a duplicate of #3338, so we should be able to close that ticket as well once we apply this patch.

02/02/12 22:52:09 changed by rjollos

  • status changed from reopened to closed.
  • resolution set to duplicate.

Fixed in #5540.


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




Change Properties
Action