Modify

Opened 16 years ago

Closed 12 years ago

#3362 closed defect (duplicate)

[Patch] Unknown encoding error with TracDownloader, Trac 0.11, Py 2.5

Reported by: Olemis Lang Owned by: Petr Škoda
Priority: highest Component: TracDownloaderPlugin
Severity: critical Keywords: encoding 0.11 TracDownloaderPlugin
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

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 (0)

Change History (11)

comment:1 Changed 16 years ago by Olemis Lang

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

comment:2 Changed 16 years ago 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

comment:3 Changed 16 years ago 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...

comment:4 Changed 16 years ago by anonymous

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

comment:5 in reply to:  4 Changed 16 years ago by Olemis Lang

Resolution: fixed
Status: newclosed

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

comment:6 Changed 16 years ago by anonymous

Resolution: fixed
Status: closedreopened

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

comment:7 Changed 13 years ago by squalyl@…

Problem still present in r9844, please apply the patch

comment:8 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)
Summary: Unknown encoding error with TracDownloader, Trac 0.11, Py 2.5[Patch] Unknown encoding error with TracDownloader, Trac 0.11, Py 2.5

comment:9 in reply to:  7 Changed 13 years ago by Ryan J Ollos

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.

comment:10 Changed 13 years ago by Ryan J Ollos

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

comment:11 Changed 12 years ago by Ryan J Ollos

Resolution: duplicate
Status: reopenedclosed

Fixed in #5540.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Petr Škoda.
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.