Datetime error on Mac OS X

Bug #732636 reported by Michka Popoff
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenFovea
Fix Released
Undecided
Charles Roduit

Bug Description

The loading procedure uses datetime.strptime to convert the date string coming from the raw AFM files.
On Mac OS X, you need to change the date format in System Preferences to English, because strptime uses the current locale to convert the string (which result in an error, because he's trying to convert an english date string with the french locale). (Note : this bug only appears in combination with gtk, which I think is messing up something in the locale's loading)

Would it be a solution to add "locale.setlocale(locale.LC_ALL, 'en_GB')" in openfovea's code to force the usage of the right locale ? Or only a "locale.setlocale(locale.LC_TIME, 'en_GB')" if you wish. This solved the problem for me.

Revision history for this message
Michka Popoff (michkapopoff) wrote :

The bug is still there in the last revision (127). I've made a patch for this one, the name of the OS is "Darwin" and not "darwin", and the key for the array is 0 and not 1.

Everything works fine after this correction.

Could you apply the patch for the next trunk update ?

Revision history for this message
Charles Roduit (charles-roduit) wrote :

Will be released shortly. Thanks.

Changed in openfovea:
status: New → Fix Committed
assignee: nobody → Charles Roduit (charles-roduit)
Changed in openfovea:
status: Fix Committed → Triaged
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.