[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-bugs] <bug>: entering a birthdate, real birthdate curren

From: Karsten Hilbert
Subject: Re: [Gnumed-bugs] <bug>: entering a birthdate, real birthdate curren
Date: Thu, 28 Apr 2011 10:48:52 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello John,

thanks for your report !

> client version: 0.9.2

While 0.9.3 is already out:

        FIX: wxPython-MacOSX needs yet another way to detach sizer items 
[thanks J.Busser]

        IMPROVED: naming of formatted item view in tree (Details -> Synopsis) 
[thanks J.Busser]
        IMRPOVED: synopsis formatting of episodes in EMR tree [thanks J.Busser]
        IMPROVED: wording of problem list headers in SOAP plugin [thanks 
        IMRPOVED: synopsis formatting of health issues in EMR tree [thanks 
        IMPROVED: problem list formatting in SOAP plugin [thanks J.Busser]

it won't help with your current problem.

> user comment  : entering a birthdate, real birthdate currently unknown, so 
> entered one that would be obviously fake, probably out of bounds for that 
> field

BTW, GNUmed meanwhile allows you to NOT enter any date of
birth if unknown -- if that doesn't work, please report this
as a bug as well.

> 2011-04-28 10:18:11  DEBUG     gm.gui 
> (/usr/share/gnumed/Gnumed/wxpython/
>  #177): unhandled exception caught:
> Traceback (most recent call last):
>   File "/usr/lib64/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/", 
> line 14636, in <lambda>
>     lambda event: event.callable(*event.args, ** )
>   File "/usr/share/gnumed/Gnumed/wxpython/", line 496, in 
> _show_picklist
> = self.__current_matches[0]['data']
>   File "/usr/share/gnumed/Gnumed/wxpython/", line 738, in 
> _set_data
>     self.__reset_tooltip()
>   File "/usr/share/gnumed/Gnumed/wxpython/", line 701, in 
> __reset_tooltip
>     dynamic_part = self._get_data_tooltip()
>   File "/usr/share/gnumed/Gnumed/wxpython/", line 221, in 
> _get_data_tooltip
>     return'%A, %d. %B %Y 
> (%x)').decode(gmI18N.get_encoding())
> ValueError: year=1001 is before 1900; the datetime strftime() methods require 
> year >= 1900

Ah, I see. This is, again, Python being unable to properly
handle dates before 1900. Now, this particular case comes
about because our date input phrasewheel was enhanced to
show a tooltip verbosely formatting the date that is
displayed only tersely within the input field itself.

That formatting fails if year < 1900.

I fixed this for 0.9.4 (it will not fail but rather display
that it cannot format the date).

If you want to fix this for yourself locally right now you
would do this:

- go find the file client/wxpython/ 
- find the function _get_data_tooltip()  (should be around line 221)
- edit that to read like this:

        def _get_data_tooltip(self):
                if is None:
                        return u''

                        return'%A, %d. %B %Y 
                except ValueError:
                        return _('Python cannot format this date, sorry.')

I hope you find the improved handling of visual progress
notes helpful.

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

[Prev in Thread] Current Thread [Next in Thread]