Modify

#11328 closed defect (fixed)

AttributeError: 'NoneType' object has no attribute 'days'

Reported by: alex.pereira Owned by: jun66j5
Priority: normal Component: TicketCalendarPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

How to Reproduce

While doing a GET operation on /ticketcalendar-box, Trac issued an internal error.

I've installed agile from the egg package available at http://www.agilofortrac.com/en/download/licensed/binary_agilo-PRO-py2.7.egg.zip, in a Ubuntu Server 12.04 host. Then, I've installed the TicketCalendar Plugin from the zip file available at http://trac-hacks.org/changeset/latest/ticketcalendarplugin?old_path=/&filename=ticketcalendarplugin&format=zip. I compiled and then used easy_install to install the egg package. I also run sudo trac-admin $ENV upgrade, and set up the plugin options in trac.ini ticketcalendar.* = enabled and ticketcalendar.web_ui.ticketcalendarmodule = enabled. After that when I access the link http://HOST/agile/ticketcalendar-box or click the corresponding button in the panel, the following error message appears AttributeError: 'NoneType' object has no attribute 'days'. How can I fix it?

Request parameters:

{}

User agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.71 Chrome/28.0.1500.71 Safari/537.36

System Information

Trac 0.12.2
Agilo 1.3.10-PRO
Babel 0.9.6 (translations unavailable)
Docutils 0.8.1
Genshi 0.6
mod_wsgi 3.3 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
Pygments 1.4
pysqlite 2.6.0
Python 2.7.3 (default, Apr 10 2013, 06:31:07)
[GCC 4.6.3]
pytz 2011k
setuptools 0.6
SQLite 3.7.9
Subversion 1.6.17 (r1128011)
jQuery 1.4.2

Enabled Plugins

binary-agilo 1.3.10-PRO
TicketCalendarPlugin 0.12.0.2
TracAccountManager 0.2.1dev

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.7/dist-packages/TicketCalendarPlugin-0.12.0.2-py2.7.egg/ticketcalendar/web_ui.py", line 805, in process_request
    return self._process_box(req, query, data, month)
  File "/usr/local/lib/python2.7/dist-packages/TicketCalendarPlugin-0.12.0.2-py2.7.egg/ticketcalendar/web_ui.py", line 831, in _process_box
    content = calendar.gen_calendar(data['tickets'], query, month)
  File "/usr/local/lib/python2.7/dist-packages/TicketCalendarPlugin-0.12.0.2-py2.7.egg/ticketcalendar/web_ui.py", line 405, in gen_calendar
    day_names = get_day_names(locale=locale, width='abbreviated')
  File "/usr/lib/python2.7/dist-packages/babel/dates.py", line 69, in get_day_names
    return Locale.parse(locale).days[context][width]
AttributeError: 'NoneType' object has no attribute 'days'

Attachments (0)

Change History (5)

comment:1 Changed 13 months ago by rjollos

  • Component changed from SELECT A HACK to TicketCalendarPlugin
  • Owner set to jun66j5

comment:2 Changed 13 months ago by jun66j5

  • Status changed from new to assigned
  • Trac Release set to 0.12

Thanks for your reporting! Reproduced using Trac with no message catalogs to install Babel after Trac.

comment:3 Changed 13 months ago by jun66j5

In 13398:

ticketcalendar: fixed AttributeError exceptions if Trac has no message catalogs and Babel is installed (refs #11328)

comment:4 Changed 13 months ago by jun66j5

The issue has been fixed in [13398]. Please try the latest version.

comment:5 Changed 11 months ago by jun66j5

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.