×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    36

    KErrPermisionDenied Error

    I have installed PythonforS60 1.4.5 3rd edition along with PythonScriptShell (same version) from Sourceforge.net on my N-80 phone
    I have a code which uses the key capture module
    this code works well on emulator
    but on my phone gives a KErrPermisionDenied Error

    please provide me the solution?

  2. #2
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    65

    Re: KErrPermisionDenied Error

    Quote Originally Posted by jiten_shah18 View Post
    I have installed PythonforS60 1.4.5 3rd edition along with PythonScriptShell (same version) from Sourceforge.net on my N-80 phone
    I have a code which uses the key capture module
    this code works well on emulator
    but on my phone gives a KErrPermisionDenied Error

    please provide me the solution?
    KErrPermisionDenied Error indicates a capability problem.

    Keycapture module requires SwEvent capability. Did you sign the scriptshell with the SwEvent capability?
    --NirpSis

    http://sites.google.com/site/nirpsis/
    http://nirpsis.blogspot.com/

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    36

    Re: KErrPermisionDenied Error

    thanks for reply

    I m new to the concept of signing so can u please help me how do i get my
    scriptshell signed with SwEvent capability

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: KErrPermisionDenied Error

    Quote Originally Posted by jiten_shah18 View Post
    thanks for reply

    I m new to the concept of signing so can u please help me how do i get my
    scriptshell signed with SwEvent capability
    hello jiten_shah18

    is very simple go to symbiansigned online submit your sis with correct IMEI of your sis and just accept the terms and condition then you are complete with the signing procedure, a email will be sent you for information about your signed sis.

    Hope it helps

  5. #5
    Registered User
    Join Date
    Mar 2011
    Posts
    44

    Re: KErrPermisionDenied Error

    Hi

    I have installed python shell script signed at Symbian signed in my phone.My application is as shown below:

    import keycapture
    from key_codes import *
    import e32
    import appuifw

    def cb_capture(key):
    if key == EKeyRightSoftkey:
    print "Right softkey pressed"
    if key == EKeyLeftSoftkey:
    print "Left softkey pressed"

    capturer = keycapture.KeyCapturer(cb_capture)
    capturer.keys = (EKeyRightSoftkey, EKeyLeftSoftkey)
    capturer.start()

    app_lock=e32.Ao_lock()
    app_lock.wait()

    It is working perfectly using the script shell interpreter.But when I install it as a stand alone application using application packager it gives the following error:

    "Traceback (most recent call last):
    File "launcher.py",line 43,in<module>
    execfile('default.py',default_namespace)
    File"default.py",line 17,in <module>
    capturer.start()
    File "C:/Documents and Settings/.......\keycapture.py", line 84, in start
    SymbianError:[Errno -46] KErrPermissionDenied

    How can I solve this? I dont know if I have SwEvent capability.How can I include this using application packager?

    Regards
    Simil

  6. #6
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: KErrPermisionDenied Error

    Quote Originally Posted by Simil Susan View Post
    Hi

    I have installed python shell script signed at Symbian signed in my phone.My application is as shown below:

    import keycapture
    from key_codes import *
    import e32
    import appuifw

    def cb_capture(key):
    if key == EKeyRightSoftkey:
    print "Right softkey pressed"
    if key == EKeyLeftSoftkey:
    print "Left softkey pressed"

    capturer = keycapture.KeyCapturer(cb_capture)
    capturer.keys = (EKeyRightSoftkey, EKeyLeftSoftkey)
    capturer.start()

    app_lock=e32.Ao_lock()
    app_lock.wait()

    It is working perfectly using the script shell interpreter.But when I install it as a stand alone application using application packager it gives the following error:

    "Traceback (most recent call last):
    File "launcher.py",line 43,in<module>
    execfile('default.py',default_namespace)
    File"default.py",line 17,in <module>
    capturer.start()
    File "C:/Documents and Settings/.......\keycapture.py", line 84, in start
    SymbianError:[Errno -46] KErrPermissionDenied

    How can I solve this? I dont know if I have SwEvent capability.How can I include this using application packager?

    Regards
    Simil
    Instructions for specifying capabilities: http://wiki.forum.nokia.com/index.ph...s_to_my_app.3F
    After that just sign the sis file (even open signed online will do) and it should work.

  7. #7
    Registered User
    Join Date
    Mar 2011
    Posts
    44

    Re: KErrPermisionDenied Error

    Cant I use self sign?...I tried but the stand alone application is not getting installed giving error "Required application not granted".I have given it for open sign online.

    If I open sign it with the IMEI number will it be possible to install the application in a different phone? Actually I want to install my application in 3 phones.So for that should I sign the sis each time with each IMEI number? I prefer to get a single signed application which could be installed in all s60 3rd edition devices I want.

    Regards
    Simil

  8. #8
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: KErrPermisionDenied Error

    Quote Originally Posted by Simil Susan View Post
    Cant I use self sign?
    No. SwEvent is a capability that can only be granted through Symbian Signed.

    Quote Originally Posted by Simil Susan View Post
    I tried but the stand alone application is not getting installed giving error "Required application not granted".I have given it for open sign online.
    Please tell us exactly what you did. Every single step, as detailed as possible.

    Quote Originally Posted by Simil Susan View Post
    If I open sign it with the IMEI number will it be possible to install the application in a different phone? Actually I want to install my application in 3 phones.So for that should I sign the sis each time with each IMEI number? I prefer to get a single signed application which could be installed in all s60 3rd edition devices I want.
    One IMEI = one device. If you want more you will have to use one of the other Symbian Signed options.

  9. #9
    Registered User
    Join Date
    Mar 2011
    Posts
    44

    Re: KErrPermisionDenied Error

    Bogdan,

    Thanks for your response.I think I have to use Express signed or Certificate signed for my purpose.

    But I am facing a problem in my application.Let me explain what I am trying to do:

    I have a list box with 5 names.When I scroll up it should read out the corresponding name.I am using module audio to read out.To sense the movement of scrollbar up and down I used keycapture module.When capturing is started it is reading out the names but the scrollbar is not moving up and down.

    How can I solve this?

    I am also using module _appswitch .But after open signing my application appswitch is not working.With self sign it was working fine.Does appswitch any capabilities other than user capabilities?

    I am expecting some advices ASAP.

    Regards
    Simil

  10. #10
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: KErrPermisionDenied Error

    If you mean that when you are pressing the down arrow, for example, the phone reads the next name but does not highlight it, then you should add this to the end of the function that is called when the key press is detected:
    Code:
    listbox.set_list(names_list, listbox.current() + 1)
    #listbox is your Listbox instance
    #names_list is the list of names you want the phone to read
    More info about those methods is available in the PyS60 documentation, in the section about Listbox.
    I hope I understood the problem. If not, please explain it again.

    As for the appswitch issue, how is it not working? Does it throw an error? Does it simply do nothing?

  11. #11
    Registered User
    Join Date
    Mar 2011
    Posts
    44

    Re: KErrPermisionDenied Error

    No appswtich does not throw an error.It is simply doing nothing.

    I think you understood my problem.But I tried it its not working.The following is my code:
    #Names.py
    import _appswitch
    import keycapture
    from key_codes import *
    import audio
    import os
    import appuifw
    import e32
    import graphics

    c = 0

    icon0 = appuifw.Icon(u"arun.mbm", 0, 0)
    icon1 = appuifw.Icon(u"manu.mbm", 0, 0)
    icon2 = appuifw.Icon(u"susan.mbm", 0, 0)
    icon3 = appuifw.Icon(u"lisal.mbm", 0, 0)

    items = [(u"Arun", icon0), (u"Manu", icon1), (u"Susan", icon2), (u"Lisa", icon3)]

    def handle_selection():
    global lb
    if items[lb.current()][0] == "Arun" :
    calls arun#code to call arun
    elif items[lb.current()][0] == "Manu" :
    calls manu#code to call manu
    elif items[lb.current()][0] == "Susan" :
    calls susan
    elif items[lb.current()][0] == "Lisal" :
    calls lisa

    def loop():
    _appswitch.switch_to_bg(u"Names")

    lb = appuifw.Listbox(items, handle_selection)
    appuifw.app.body = lb
    appuifw.app.menu = [(u'Hide',loop)]
    appuifw.app.exit_key_handler=loop



    def audio():
    global c
    if c == 1:
    playMP3wf()
    elif c == 2:
    playMP3mp()
    elif c == 3:
    playMP3df()
    elif c == 4:
    playMP3rf()
    elif c == 5:
    playMP3rspns()


    def down():
    global c
    c += 1
    if c == 6:
    c = 0
    audio()


    def up():
    global c
    c -= 1
    if c == -1:
    c = 5
    audio()


    def cb_capture(key):
    if key == EKeyUpArrow:
    up()
    if key == EKeyDownArrow:
    down()
    listbox.set_list(items, listbox.current() + 1)


    capturer = keycapture.KeyCapturer(cb_capture)
    capturer.keys = (EKeyUpArrow, EKeyDownArrow)
    capturer.start()

    app_lock = e32.Ao_lock()
    app_lock.wait()


    In this it is not going to background when exit key or the hide selection is used.But it was working fine when I installed without signing(that is when I didnt use the key capture module).
    Please check if the code in bold is correct.Is that where I have to put it?I didn get names_list.Is it items in my code?

    Regards
    Simil

  12. #12
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: KErrPermisionDenied Error

    names_list is items in your code.

    I though you couldn't move through the list because when you capture the arrow keys, you replace their effect with the one you specify through the callback functions. That's why I suggested you add that code in your functions, so that you force the currently selected item in the list to move in the direction of the arrow you press (note that you should put it in your up and down functions, not in the cb_capture function, and make sure the effect is appropriate. Hint: - 1 for up, + 1 for down).

    If that doesn't fix it please explain the problem again.
    Last edited by bogdan.galiceanu; 2011-03-27 at 18:30.

  13. #13
    Registered User
    Join Date
    Mar 2011
    Posts
    44

    Re: KErrPermisionDenied Error

    Thanks a lot Bogdan...it worked perfectly...

    Any idea about why appswitch is not working?...does appswitch need any seperate capability?

    If some one knows the answer please help...

  14. #14
    Registered User
    Join Date
    Mar 2011
    Posts
    44

    Re: KErrPermisionDenied Error

    Hey appswitch has started to work some how...But one more problem.If I scroll down quickly the audios are overlapping and creating a mess.Is there any method to stop an audio file when another audio is called?

  15. #15
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: KErrPermisionDenied Error

    You could perhaps check if an audio file is playing and, if it is, stop it. The things you need to use are described in the PyS60 documentation for the audio module.

    A strange thing is that the documentation says
    Currently the module does not support playing simultaneous audio files, calling play to a second Sound instance while another audio file is playing, stops the earlier audio file and starts to play the second Sound instance.
    so your app's behavior is not normal

Similar Threads

  1. XMl Parser Implementation for Symbian
    By ittiam in forum Symbian
    Replies: 26
    Last Post: 2009-09-16, 05:26
  2. to get ssid
    By d.devendran in forum Symbian
    Replies: 4
    Last Post: 2009-07-15, 09:42
  3. playing aduio file when call is rejected.
    By santosh_sangewar in forum Symbian
    Replies: 6
    Last Post: 2009-06-12, 11:35
  4. i cant build helloworld project
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2008-12-22, 12:38
  5. My BuilderX (with S60 SDK 2.1.NET MS version) cannot build ARMI UREL
    By danielvidonyi@hotmail.com in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-05-04, 21:30

Posting Permissions

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