Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12176 closed defect (fixed)

WatchlistPlugin breaking trac 1.0.3

Reported by: massimo.b@… Owned by: Martin Scharrer
Priority: normal Component: WatchlistPlugin
Severity: blocker Keywords:
Cc: Trac Release:

Description

I installed the TracWatchlistPlugin-1.0.1-py2.7.egg built from svn sources. But it breaks trac at start:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/trac/web/api.py", line 556, in send_error
    data, 'text/html')
  File "/usr/lib64/python2.7/site-packages/trac/web/chrome.py", line 1054, in render_template
    template = self.load_template(filename, method=method)
  File "/usr/lib64/python2.7/site-packages/trac/web/chrome.py", line 1011, in load_template
    self.get_all_templates_dirs(), auto_reload=self.auto_reload,
  File "/usr/lib64/python2.7/site-packages/trac/web/chrome.py", line 719, in get_all_templates_dirs
    for provider in self.template_providers:
  File "/usr/lib64/python2.7/site-packages/trac/core.py", line 78, in extensions
    components = [component.compmgr[cls] for cls in classes]
  File "/usr/lib64/python2.7/site-packages/trac/core.py", line 204, in __getitem__
    component = cls(self)
  File "/usr/lib64/python2.7/site-packages/trac/core.py", line 140, in __call__
    self.__init__()
  File "build/bdist.linux-x86_64/egg/tracwatchlist/plugin.py", line 91, in __init__
    locale_dir = resource_filename(__name__, 'locale')
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 950, in resource_filename
    self, resource_name
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1646, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1667, in _extract_resource
    timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
KeyError: 'tracwatchlist/locale'
[watchlist]                                                   
display_notify_navitems = true                                
notifications = true                                          
notify_by_default = true                                      
display_notify_column = true                                  
stay_at_resource = true                                       
show_messages_on_resource_page = true                         
show_messages_on_watchlist_page = true                        
show_messages_while_on_watchlist_page = true

Attachments (0)

Change History (9)

comment:1 Changed 9 years ago by massimo.b@…

I also tried with empty configuration [watchlist]. I did upgrade the db before.

comment:2 Changed 9 years ago by Ryan J Ollos

The workaround of installing Babel should work, however the issue should be fixed so that Babel is not required.

comment:3 Changed 9 years ago by Jun Omae

Please try the following patch.

  • watchlistplugin/0.12/tracwatchlist/plugin.py

    diff --git a/watchlistplugin/0.12/tracwatchlist/plugin.py b/watchlistplugin/0.12/tracwatchlist/plugin.py
    index 38a387d..eaff75a 100755
    a b class WatchlistPlugin(Component): 
    8888
    8989    def __init__(self):
    9090        # bind the 'watchlist' catalog to the specified locale directory
    91         locale_dir = resource_filename(__name__, 'locale')
    92         add_domain(self.env.path, locale_dir)
     91        try:
     92            locale_dir = resource_filename(__name__, 'locale')
     93        except KeyError:
     94            pass  # no locale directory
     95        else:
     96            add_domain(self.env.path, locale_dir)
    9397
    9498        #
    9599        self.realms = []

comment:4 Changed 9 years ago by anonymous

you can also try AnnouncerPlugin

comment:5 Changed 9 years ago by massimo.b@…

Thanks. Working now with that patch. Please integrate that, as Babel is optional in most environments.

While using AnnouncerPlugin at the same time, what benefit do I have from the WatchlistPlugin? Both offer a watch button on tickets and wikis.

comment:6 Changed 9 years ago by Jun Omae

Resolution: fixed
Status: newclosed

In 14415:

1.0.1: fixed a KeyError being raised when translations unavailable (closes #12176)

comment:7 Changed 9 years ago by Jun Omae

I think AnnouncerPlugin is currently unstable.

comment:8 in reply to:  7 ; Changed 9 years ago by anonymous

Replying to jun66j5:

I think AnnouncerPlugin is currently unstable.

Hm, where do you know that from? There is nothing about developing status or known bugs, no, at least for the release versions. Ok, I'm using trunk build ... Do you mean the comment "The email distribution is not as stable..."?

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

Replying to anonymous:

Hm, where do you know that from?

Experience using it. Also, take a look at the list of known issues and lack of development activity. If it is working for you in your use cases, great, but in general there are a lot of issues to beware of.

Modify Ticket

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