Share

PyS60

Tracker: Bugs

5 audio.Sound.record won't work in compiled sis file - ID: 2027245
Last Update: Comment added ( cpina )

Enviroments:

PythonForS60_1_4_0_3rdEd.sis
PythonScriptShell_1_4_0_3rdEd.sis
ensymble_python2.2-0.23.py

Device:

V 20.0.0.15
13-11-07
RM-159
Nokia N95(01.01)

Problems:

I made an script by python to record conversation while call is connected.

It works find if I execute this script from shell.
The problems is, if I make it a sis file by ensymble, it stop working.

Please refer the code: In shell enviroment, it could works well and it went
to end of code, the log file will writen, however,If I compile it to sis
file, the code will not executing in s.record().

I try to capture the exception, nothing is given.Only the first sentence
'sound file opening' is writen to logfile




def audioupload (self):



s = audio.Sound.open('c:\\Data\\call.amr')


logfile = open ('c:\\Data\\log.txt', 'a')
logfile.write('sound file opening')
logfile.close()


try:

s.record()
logfile = open('c:\\Data\\log.txt', 'a')
logfile.write('sound file recording')
logfile.close()

except:


logfile = open('c:\\Data\\log.txt', 'a')
logfile.write(sys.exc_type, ":", sys.exc_value)
logfile.close()



while (self.record_flag==True):
e32.ao_sleep(3) # do if for 5 seconds

s.stop()
s.close()


alading ( alading ) - 2008-07-24 22:05

5

Open

None

Jukka Laurila

audio

None

Public


Comments ( 3 )

Date: 2008-07-25 23:21
Sender: cpina


Hello alading,

I have not tested your coded, so I don't have more ideas.

When I converted from .py to .sys with my caps with the verbose flag I had
a line like:
Capabilities 0x9e000
(NetworkServices+LocalServices+ReadUserData+WriteUserData+UserEnvironment)

I guess that you had this line too.

Maybe, just for testing, you can try compiling with the same line than me
(without cert, etc.). Just in case the problem is here. Or try to send a
SMS or access some other local resource.

I don't have more ideas, actually I don't know about S60 and programming
(just playing today a bit). If I've guessed something comment it here :-)

Carles


Date: 2008-07-25 21:22
Sender: alading


Hi, Carles

Thanks for your reply.
Yes I did include the capabilities already when I package the sis file.

python ensymble_python2.2-0.23.py py2sis --uid=0xE262CF85 --icon=dog.svg
--appname="record" --shortcaption="record" --caption="record"
--caps=LocalServices+NetworkServices+WriteUserData+ReadUserData+SwEvent+ReadDeviceData+WriteDeviceData
--version=1.0.0 --cert=mmdd_all_02_28.cer
--privkey=complete_publisherID_pvt.key --passphrase=12345 --verbose
record.py

The cert and key is my developer cert which have the specific
capabilities



Date: 2008-07-25 16:30
Sender: cpina


Hello,

I'm new programming in Nokia S60 but I have found the same problem: some
actions was possible from the interpreter but not from the .SIS file.

Could you check that when you prepare the .SIS file you enable the
capabilities? I'm compiling the .SIS file using:
ensymble_python2.5-0.27.py py2sis --appname=primers --version=1.0.4
--caps=NetworkServices+LocalServices+ReadUserData+WriteUserData+UserEnvironment
--verbose primer.py primer.sis

without the --caps option I couldn't send emails and was failing silency
(no exception, mesage, etc.)

Carles


Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.