Opened 5 years ago

Closed 5 years ago

#11328 closed defect (fixed)

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

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


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, in a Ubuntu Server 12.04 host. Then, I've installed the TicketCalendar Plugin from the zip file available at 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
TracAccountManager 0.2.1dev

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/web/", line 511, in _dispatch_request
  File "/usr/lib/python2.7/dist-packages/trac/web/", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.7/dist-packages/TicketCalendarPlugin-", line 805, in process_request
    return self._process_box(req, query, data, month)
  File "/usr/local/lib/python2.7/dist-packages/TicketCalendarPlugin-", line 831, in _process_box
    content = calendar.gen_calendar(data['tickets'], query, month)
  File "/usr/local/lib/python2.7/dist-packages/TicketCalendarPlugin-", line 405, in gen_calendar
    day_names = get_day_names(locale=locale, width='abbreviated')
  File "/usr/lib/python2.7/dist-packages/babel/", 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 5 years ago by Ryan J Ollos

Component: SELECT A HACKTicketCalendarPlugin
Owner: changed from anonymous to Jun Omae

comment:2 Changed 5 years ago by Jun Omae

Status: newassigned
Trac Release: 0.12

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

comment:3 Changed 5 years ago by Jun Omae

In 13398:

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

comment:4 Changed 5 years ago by Jun Omae

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

comment:5 Changed 5 years ago by Jun Omae

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jun Omae.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.