You Are Here:

Community: Developer Discussion Boards

#1 Old Latest version - 2009-06-25, 23:00

Join Date: Mar 2006
Posts: 26
patlucas
Offline
Registered User
Hi

I have Python both installed on my PC ans Nokia 7610.

On my PC it says that the version is 2.4.1 and on my handset it says 1.4.5 final (interactive console says version 2.2.2).

My code runs fine on the PC and yet produces the following error on my handset.
Code:
AttributeEror: 'module' object has no attribute 'strptime'
This error refers to the line below.
Code:
time.mktime(time.strptime("01 Mar " + str(year), "%d %b %Y")) - 3600 + ((n - 3) * 31 + p) * 86400
Any ideas?

And before you ask, I do import the time module.

Patrick
Reply With Quote

#2 Old Re: Latest version - 2009-06-26, 05:38

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by patlucas View Post
Hi

I have Python both installed on my PC ans Nokia 7610.

On my PC it says that the version is 2.4.1 and on my handset it says 1.4.5 final (interactive console says version 2.2.2).

My code runs fine on the PC and yet produces the following error on my handset.
Code:
AttributeEror: 'module' object has no attribute 'strptime'
This error refers to the line below.
Code:
time.mktime(time.strptime("01 Mar " + str(year), "%d %b %Y")) - 3600 + ((n - 3) * 31 + p) * 86400
Any ideas?

And before you ask, I do import the time module.

Patrick
hello Patrick

i am not sure but may be the function strptime is not available in the core Python version 2.2.2 on which the PyS60 1.4.x are based. Please make a check of that.


Regards
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#3 Old Re: Latest version - 2009-06-26, 07:34

Join Date: Apr 2007
Posts: 131
mahesh.sayibabu's Avatar
mahesh.sayibabu
Offline
Regular Contributor
You can try with the new version of PyS60(with Python core 2.5.4) that can be downloaded from here. This supports 'strptime'.
Reply With Quote

#4 Old Re: Latest version - 2009-06-26, 07:48

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by mahesh.sayibabu View Post
You can try with the new version of PyS60(with Python core 2.5.4) that can be downloaded from here. This supports 'strptime'.
hello mahesh

but patrick is using Nokia 7610 and we all know that 2nd edition devices don't have the 1.9.x support.

Regards
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#5 Old Re: Latest version - 2009-06-26, 08:19

Join Date: Apr 2007
Posts: 131
mahesh.sayibabu's Avatar
mahesh.sayibabu
Offline
Regular Contributor
Quote:
Originally Posted by gaba88 View Post
hello mahesh

but patrick is using Nokia 7610 and we all know that 2nd edition devices don't have the 1.9.x support.

Regards
Gaba88
oh.. "on Nokia 7610", I overlooked that part!
Reply With Quote

#6 Old Re: Latest version - 2009-06-26, 15:56

Join Date: Mar 2006
Posts: 26
patlucas
Offline
Registered User
Ok. Let's look at the problem a different way. I am using strptime("01 Mar " + str(year), "%d %b %Y") to create a fixed point in time in a given year. Is there any other way of creating that fixed point in time. Can I construct a struct_time tuple directly?
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
[moved] Problems during the installation of a new version. NikolaN Installation, Certification and Security 10 2009-06-18 12:25
Open C libm.lib (math lib) needs update to version 4 jimgilmour1 Open C/C++ 1 2007-04-19 17:51
6670 latest firmware version? smartegyptian General Symbian C++ 0 2005-01-07 23:02
Latest version of Nokia 22 Configurator JCOSTA Nokia M2M 1 2002-09-30 11:30
what's the latest version of the SDK? cl_eci_dev Symbian Tools & SDKs 2 2002-05-08 20:12

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia