Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8746 closed defect (fixed)

Unicode trouble

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

Description (last modified by rjollos)

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/formatter.py", line 484, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 180, in process
    text = self.processor(text)
  File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 167, in _macro_processor
    text)
  File "/usr/local/lib/python2.6/dist-packages/ResourceReservation-1.0.3-py2.6.egg/resreservation/macros.py", 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/macros.py", 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 4 years ago by rjollos

  • Description modified (diff)

comment:2 Changed 4 years ago by seccanj

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

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 4 years ago by seccanj

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

Add Comment

Modify Ticket

Action
as closed The owner will remain seccanj.
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.