×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    20

    problem with save file and debug technic

    hello friends

    I have strange problem with save file.
    I have simple code - save sms to file:

    box = inbox.Inbox()
    for i in range(len(box.sms_messages())):
    idsms = box.sms_messages()[i]
    sms = box.content(idsms)
    sms = sms.encode('utf-8','ignore')
    sms += "\n"
    f = open(u"C:\\sms.txt","a")
    f.write(sms)
    f.close()

    On emulator (PC) everything works fine.
    On device (n73) in ScriptShell works fine too.
    But when I make standalone aplication (.sis) program dosent work ! Nothing saves. !
    I changed drive to E:\\ and nothing !
    I have Python and ScriptShell on E:\\

    So, I wanted to use one of debug technic:

    def main():
    try:
    my_program()
    except:
    import sys
    import traceback
    import appuifw
    cla, exc, trbk = sys.exc_info()
    excName = cla.__name__
    try:
    excArgs = exc.args
    except KeyError:
    excArgs = "<no args>"
    excTb = traceback.format_tb(trbk, 5)
    errorString = repr(excName) + '-' + repr(excArgs) + '-' + repr(excTb) + '\n'
    print errorString
    appuifw.note(u'Application errors, see log file for more information', "error")
    file = open(u'c:\\Log.txt','a')
    file.write(errorString)
    file.close()
    raise

    if __name__ == "__main__":
    main()


    But Nothing !!! No errors saves ! Nothing happens ! No file log.txt and sms.txt
    I have no idea what is going on.
    I tried to install python and scripshell on C: and E: Always problem is the same ! Program doesnt save file !
    I thought this is problem with capabilites, so I haked my phone. And nothing !

    Any suggestions ???

  2. #2
    Registered User
    Join Date
    Nov 2005
    Posts
    20

    Re: problem with save file and debug technic

    I reset device and run again. I run my program and I got info from saved file c:\\Log.txt:

    'SymbianError' - (-46, 'KErrPermissionDEnied')-[' File "E:\\private\\afffffff\\default.py", line 16, in main\n my_program()\n', ' File "E:\\private\\afffffff\\default.py", line 14, inmy_program\n box = inbox.Inbox()\n' ]

    ???

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    8

    Re: problem with save file and debug technic

    On emulator (PC) everything works fine.
    On device (n73) in ScriptShell works fine too.
    But when I make standalone aplication (.sis) program dosent work ! Nothing saves. !
    First of all
    you have some what finish your work
    and you don't need any debug

    This problem coz of protected API for mobile resources ( contact , gsm .. etc )
    so if using eseymble to build your sis then add something like this ( focus here on caps option )

    Code:
    python ensymble_python2.5-0.26.py py2sis --caps=NetworkServices+LocalServices+ReadUserData+WriteUserData+ReadDeviceData+TrustedUI+WriteDeviceData --uid=0xeabc8765 --appname=name --version=1.0.0 source.py output.sis
    know if asking what capabilities to use then use the readme txt file for the nokia phone you are using ( 2nd , 3rd )
    and you will find this

    then just sign the produced sis at
    https://www.symbiansigned.com/app/pa...ignedOnline.do

    hope this wil help you

  4. #4
    Registered User
    Join Date
    Nov 2005
    Posts
    20

    Re: problem with save file and debug technic

    Thank you m.alsheikh - It works !!!!!!!!
    Program saves files alreday.

    regards

Similar Threads

  1. problem with save date from tabble to file
    By samosnokia in forum Symbian
    Replies: 12
    Last Post: 2009-07-03, 09:45
  2. Does the epoc.exe application save debug output to a text file?
    By thuskins in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2007-01-02, 10:45
  3. Camera Problem - unable to save file
    By Aucker in forum Streaming and Video
    Replies: 6
    Last Post: 2006-05-25, 07:40
  4. File save problem
    By zwgoal in forum Symbian
    Replies: 3
    Last Post: 2005-11-11, 10:11
  5. utf-8 problem when i save a file using notepad?
    By simon3000 in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2002-06-13, 10:51

Posting Permissions

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