You Are Here:

Community: Developer Discussion Boards

Reply « Previous Thread | Next Thread »

#1 Old Python crashes on e61 when openining contacts - 2006-11-06, 12:44

Join Date: Nov 2006
Posts: 1
jagoncalves
Offline
Registered User
On my e61 with Phyton 1.3.12 3rdEd :

import contacts
db = contacts.open()

crashes Python from interactive console or by script

(however, for example :

import calendar
db = agenda.open()

work well )

Any help?
Reply With Quote

#2 Old Re: Python crashes on e61 when openining contacts - 2006-11-06, 14:12

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Originally Posted by jagoncalves
On my e61 with Phyton 1.3.12 3rdEd :

import contacts
db = contacts.open()

crashes Python from interactive console or by script

(however, for example :

import calendar
db = agenda.open()

work well )

Any help?
hello jagoncalves,

Welcome to this Forum
It's normal because E61 is a 3rd edition Phone and contacts module is not supported in 3rd edition standard package because some missings capabilities(ReadDeviceData)
calendar has been reimplemented differently since 1.3.12 only by using others api as 2rd edition.
But it's possible to use contact module if you recompile yourself source code and by using a ACS certificate. Search in the forum if you want to do this ...


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#3 Old Re: Python crashes on e61 when openining contacts - 2006-11-06, 18:53

Join Date: Oct 2006
Posts: 12
sjh
Offline
Registered User
Just to make sure I understand what you are saying...

W/ S60 3rd edition, you can't use a self-signed cert if you want to use contacts. Right?

If I made my own CA, and imported it into my phone, could I then use an app signed by it to use contacts?
Reply With Quote

#4 Old Re: Python crashes on e61 when openining contacts - 2006-11-10, 18:06

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Contacts support without extra capas on 3rd edition is coming really soon now. You might want to wait for a few weeks so you'll be able to access it without all the certificate hassle.
Reply With Quote

#5 Old Re: Python crashes on e61 when openining contacts - 2006-11-12, 05:20

Join Date: Aug 2004
Posts: 14
bhima
Offline
Registered User
I just got a free DevCert for my phone, a US-model E70 with the latest firmware.

The symbiansigned.com certificate is listed as including Read/WriteDeviceData, and TrustedUI. I un-installed python, and then installed the Python and Shell SISX files I had signed using signsis.

However, contacts.open crashes, and location.gsm_location still returns None.

What's going on? Did the DevCert actually lie? It was clear when installing it that the installer did, in fact, read and understand the certificate...
Reply With Quote

#6 Old Re: Python crashes on e61 when openining contacts - 2006-11-12, 12:03

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Quote:
Originally Posted by bhima
I un-installed python, and then installed the Python and Shell SISX files I had signed using signsis.
Did you rebuild the Python Script Shell as well?

Simply signing a SIS file with a certificate is not enough to enable capabilities. It only allows installing a SIS file that claims to use any protected capabilities.

Symbian EXE files contain a capability bit mask in their header. Symbian OS uses this bit mask to determine which capabilities a program is allowed to use. In Python for S60's case, this bit mask is contained in a short EXE stub included with every stand-alone Python program, for example the Python Script Shell.

You could use Ensymble to package a stand-alone Python program and use the --caps option to set the required capabilities. The program in the resulting SIS file should be able to access all the capabilities your certificate allows (not tested...).
Reply With Quote

#7 Old Re: Python crashes on e61 when openining contacts - 2006-11-12, 16:32

Join Date: Aug 2004
Posts: 14
bhima
Offline
Registered User
Quote:
Originally Posted by jethro.fn
Did you rebuild the Python Script Shell as well?
<snip>
You could use Ensymble to package a stand-alone Python program and use the --caps option to set the required capabilities. The program in the resulting SIS file should be able to access all the capabilities your certificate allows (not tested...).
Thanks for the explanation. I don't have the Symbian SDK installed, so I haven't tried rebuilding the Script Shell.

I just tried ensymble - looks very good. It works correctly when I don't give it a certificate. However, when I give it my DevCert, the resulting SIS file can't be installed on my device - it complains that there is a certificate error. I tried running both a signed and an unsigned SIS file through signsis.exe, but it failed with the error message "SISfile error, expected data not found"

Any suggestions how to proceed?

Thanks.
Reply With Quote

#8 Old Re: Python crashes on e61 when openining contacts - 2006-11-12, 17:35

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Quote:
Originally Posted by bhima
I just tried ensymble - looks very good. It works correctly when I don't give it a certificate. However, when I give it my DevCert, the resulting SIS file can't be installed on my device - it complains that there is a certificate error. I tried running both a signed and an unsigned SIS file through signsis.exe, but it failed with the error message "SISfile error, expected data not found"

Any suggestions how to proceed?
Well, I have actually never seen a genuine DevCert. The tool to request one only runs on Windows, and I haven't bothered to try it. Maybe I should finally get my own DevCert and see what Ensymble does differently to signsis.exe...

I can confirm the "SISfile error, expected data not found." message when running signsis.exe. Somehow it does not like Ensymble-generated SIS-files. I will investigate this strange problem.
Reply With Quote

#9 Old Re: Python crashes on e61 when openining contacts - 2006-11-12, 18:53

Join Date: Aug 2004
Posts: 14
bhima
Offline
Registered User
Quote:
Originally Posted by jethro.fn
Well, I have actually never seen a genuine DevCert. The tool to request one only runs on Windows, and I haven't bothered to try it. Maybe I should finally get my own DevCert and see what Ensymble does differently to signsis.exe...
I just have the non-ACS free one. I had to boot up Windows XP under Parallels to run that tool, but that was the most painful part.

The certificate data file contains two blocks of MIME'd ASCII:
Code:
-----BEGIN CERTIFICATE-----
....data....
-----END CERTIFICATE-----
is repeated twice.
Just out of curiosity, I removed the first block and tried using your script. It worked without complaint on a cert file with _only_ the second certificate. However, it didn't actually work on the phone itself.

unsis.pl also doesn't seem to work for me on the SIS files I've tried - I was going to try to simply modify the contents of the PythonShell SIS file and repackage it. I'm now just rebuilding pys60 under Windows, with more capabilities. We'll see how that works...
Reply With Quote

#10 Old Re: Python crashes on e61 when openining contacts - 2006-11-12, 19:17

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
I registered to Symbian Signed and now I'm trying to find a Windows machine to run the DevCert tool.

In the meantime, if you want to extract files out of a SIS file, there's a "decodesisx.py" in the Ensymble source package:

Code:
$ mkdir sisfiles
$ decodesisx.py -t sisfiles -f sisfiletoextract.sis
It unfortunately does not name the files too intelligently. A hex dump option ("-d") may be of some help to identify the file names. Each SISFileDescription field contains information about files and later in the SIS file there is SISFileData fields in the same order.
Reply With Quote

#11 Old Re: Python crashes on e61 when openining contacts - 2006-11-12, 22:53

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
I've released a new version of Ensymble, version 0.14 2006-11-12. Ensymble now supports Symbian Signed Developer Certificates (and other chained certificates), and the generated SIS packages are compatible with Windows signsis.exe, should you want to re-sign an already signed SIS file.

Please test it and tell me how it works for you.
Reply With Quote

#12 Old Re: Python crashes on e61 when openining contacts - 2006-11-14, 19:58

Join Date: Aug 2004
Posts: 14
bhima
Offline
Registered User
Quote:
Originally Posted by jethro.fn
I've released a new version of Ensymble, version 0.14 2006-11-12. Ensymble now supports Symbian Signed Developer Certificates (and other chained certificates), and the generated SIS packages are compatible with Windows signsis.exe, should you want to re-sign an already signed SIS file.

Please test it and tell me how it works for you.
Thanks!

It seems to work, generally, and produces the expected "This is a developer app" warnings.

However, some of the capabilities options produce error messages on the phone when I try to open the app: "Menu: Unable to execute file for security reasons."

This error happens even with capabilities that my DevCert is supposed to have...

My current theory is that the Python DLL is signed with fewer capabilities, and that you aren't allowed to use a DLL with fewer capabilities than you have, since the DLL will automagically inherit your capabilities. But I'm just speculating.
Reply With Quote

#13 Old Re: Python crashes on e61 when openining contacts - 2006-11-15, 09:04

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Quote:
Originally Posted by bhima
My current theory is that the Python DLL is signed with fewer capabilities, and that you aren't allowed to use a DLL with fewer capabilities than you have, since the DLL will automagically inherit your capabilities. But I'm just speculating.
Yes, that seems plausible.

I have an idea: It would be relatively simple to add a command to Ensymble that allows "patching" and re-signing an existing SIS file (and any DLLs and EXEs contained within), to have different capabilities. This would enable anyone with a DevCert to use all its capabilities with Python for S60.

I'm quite busy these days, but I try to implement this in the near future.
Reply With Quote

#14 Old Re: Python crashes on e61 when openining contacts - 2006-11-21, 17:49

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
The 1.3.14 release now ships with unsigned SIS packages in a flat format (no embedded packages) so you can easily sign them yourself.
Reply With Quote

#15 Old Re: Python crashes on e61 when openining contacts - 2006-11-21, 19:00

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Quote:
Originally Posted by jplauril
The 1.3.14 release now ships with unsigned SIS packages in a flat format (no embedded packages) so you can easily sign them yourself.
Well, it's a good thing I didn't begin to implement my idea, after all... Although a signsis command would still be useful for those without a Windows PC.
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
Please help installing Python libraries on S60 ericroijen Python 11 2009-07-18 11:43
Python for Series 60 released on Forum Nokia! eriksmartt Python 5 2009-07-14 18:00
Application crashes with OutOfMemoryError on E61 abhisarswami Mobile Java General 3 2006-10-12 01:52
Python crashes Kintaro85 Python 2 2006-09-29 12:03
Python Crashes using 1eXX on 2nd Ed. infomaniac Python 2 2006-09-05 22:45

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