Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#8746 closed defect (fixed)

Unicode trouble

Reported by: contact.thorsten@… Owned by: Roberto Longobardi
Priority: normal Component: ResourceReservationPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

First off, nice work, I was looking for this for quite some time!

I did get:

Error: Macro !ResourceReservationList(type=resource,period=3,title=Prüfstand) failed
'unicode' object has no attribute 'month'

Adding some resources and setting reservations works - but only up until reloading the page. Then above failure blocks the macro. Flushing the resreservation table did help. It seems as soon as I enter reservation dates it stops to work. There are unicode characters in german named months if that creates an issue.

Trac-Version: 0.11.7

hum, I just found some output on the console:

Trac[formatter] ERROR: Macro !ResourceReservationList(type=resource,period=3,title=Prüfstand) failed: 
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/trac/wiki/", line 484, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/lib/python2.6/dist-packages/trac/wiki/", line 180, in process
    text = self.processor(text)
  File "/usr/lib/python2.6/dist-packages/trac/wiki/", line 167, in _macro_processor
  File "/usr/local/lib/python2.6/dist-packages/ResourceReservation-1.0.3-py2.6.egg/resreservation/", line 52, in expand_macro
    return _render_resreservation_list(self.env, req, res_type, period, title, override)
  File "/usr/local/lib/python2.6/dist-packages/ResourceReservation-1.0.3-py2.6.egg/resreservation/", line 130, in _render_resreservation_list
    curr_month = curr_date.month - first_month
!AttributeError: 'unicode' object has no attribute 'month'

Attachments (0)

Change History (3)

comment:1 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 13 years ago by Roberto Longobardi

Resolution: fixed
Status: newclosed

Hi, thanks for reporting this.

You may also have named this ticket "It simply doesn't work" :D

I mistakenly removed a single token in the database creation code, which just ruined everything.

And I just found out it's been this way since months... I wonder why no one ever opened a ticket before.

Anyway, now's fixed.

Please find the updated package on sourceforge, release 1.0.4.

Ciao, Roberto

comment:3 Changed 13 years ago by Roberto Longobardi

BTW, I also updated the wiki page here on trac-hacks with a couple more details about the security permissions and macro parameters.

Modify Ticket

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