Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13026 closed defect (fixed)

[patch] fix error 'ImportError: cannot import name _' for trac 1.2

Reported by: komar Owned by: komar
Priority: normal Component: MultiProjectBacklogPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

After upgrading trac to 1.2 I get error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/loader.py", line 68, in _load_eggs
    entry.load(require=True)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/dist-packages/multiprojectbacklog/web_ui.py", line 29, in <module>
    from trac.util.text import _, unicode_quote, unicode_from_base64, unicode_to_base64
ImportError: cannot import name _

there is a patch

--- a/web_ui.py      2017-01-04 16:00:37.675121173 +0100
+++ b/web_ui.py      2017-01-04 16:00:42.000000000 +0100
@@ -26,7 +26,8 @@
 from trac.util.datefmt import format_date
 from trac.util.html import html
 from trac.util import get_reporter_id
-from trac.util.text import _, unicode_quote, unicode_from_base64, unicode_to_base64
+from trac.util.text import unicode_quote, unicode_from_base64, unicode_to_base64
+from trac.util.translation import _
 
 from multiprojectbacklog.schema import schema_version, schema
 try:

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 16173:

MultiProjectBacklogPlugin 0.4.0dev: Fix incorrect import

Patch by komar.

Fixes #13026.

comment:2 Changed 8 years ago by Ryan J Ollos

Owner: changed from Cinc-th to komar

Modify Ticket

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