marcelobarrosufu / wordmobi

Automatically exported from code.google.com/p/wordmobi
0 stars 0 forks source link

NameError: global name 'calendar' is not defined. #81

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Phone model: NOKIA 5320XM
Wordmobi version: 0.94
Python version: 2.0

What steps will reproduce the problem?
1.After I new a article, no matter how many forms I fill,such as title, 
content and so on, when I press the right button of the phone to exit(save, 
cancel, or publish), It will popup a error such as

'dataCreated':DateTime(timemktime(dt)).
File "C:\data\python\wordmobidir\mktimefix.py",line 6. in <lambda>
mktime = lambda time_tuple: calendar.timegm(time_tuple) + timezone
NameError:global name 'calendar' is not defined.

But the error is not a dialog, it is like a temp message. When I press arrow 
keys, it will disappear and return to the edit section. so I can't exit 
wordmobi unless I exit forcely. 

Original issue reported on code.google.com by klni...@gmail.com on 15 Aug 2010 at 6:27

GoogleCodeExporter commented 9 years ago
Fixed this on my install, edited the file data\python\wordmobidir\mktimefix.py 
to remove the calendar. from the line.

Original comment by IanDen...@gmail.com on 6 Mar 2011 at 3:00

GoogleCodeExporter commented 9 years ago
Wich line do I have to edit?
Don't know what I have to delete

My mktimefix.py looks like:
from time import *
from calendar import timegm

# fix for mktime bug
# 
https://garage.maemo.org/tracker/index.php?func=detail&aid=4453&group_id=854&ati
d=3201
mktime = lambda time_tuple: calendar.timegm(time_tuple) + timezone

Original comment by elias.ki...@gmail.com on 19 Jun 2012 at 12:15