Ticket #8746 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Unicode trouble

Reported by: contact.thorsten@gmail.com Assigned to: 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

Change History

04/30/11 08:23:03 changed by rjollos

  • description changed.

04/30/11 12:05:02 changed by seccanj

  • status changed from new to closed.
  • resolution set to fixed.

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

04/30/11 12:06:06 changed 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/Change #8746 (Unicode trouble)




Change Properties
Action