×

Discussion Board

Results 1 to 3 of 3

Hybrid View

  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    SymbianError -1, KErrNotFound

    Huh,

    What could be wrong here, I just don't understand. Code (the very same file) works ok in S60 3.1 emulator with PyS60 1.4.5, but crashes in N82 (S60 3.1) running PyS60 1.4.5 PythonShell:

    Code:
    if DEBUG: print "111111"
    #appuifw.app.body = appuifw.Listbox(entries)
    
    # SymbianError -1, 'KErrNotFound'
    # File "e:\\python\\flagicon48.py", line 237, in ?
    # appuifw.app.body = appuifw.Listbox(entries)
    
    # Unable to find the specified object
    
    try:
        print appuifw
        print appuifw.app
        print appuifw.app.body
        global appuifw
        appuifw.app.body = appuifw.Listbox(entries)
    except:
        import sys
        import traceback
        import appuifw
        cla, exc, trbk = sys.exc_info()
        excName = cla.__name__
        try:
            excArgs = exc.__dict__["args"]
        except KeyError:
            excArgs = "<no args>"
        excTb = traceback.format_tb(trbk, 5)
        errorString = repr(excName) + '-' + repr(excArgs) + '-' + repr(excTb) + '\n'
        print errorString
    
    if DEBUG: print "222222"
    Emulator trace:
    Code:
    111111
    <module 'appuifw' from 'c:\resource\appuifw.py'>
    <Application object at 0x314f6198>
    <appuifw.Listbox object at 0x31510750>
    222222
    As you can see, no problems whatsoever! But here's N82 trace:
    Code:
    111111
    <module 'appuifw' from 'c:\resource\appuifw.py'>
    <Application object at 0x1713368>
    <appuifw.Listbox object at 0x1738e80>
    === CALL c:\resource\site.py	platsec_import@93:     def platsec_import(name, globals=None, locals=None, fromlist=None):
    
        ... skipping 351 lines ...
    
    === RETURN c:\resource\traceback.py	format_list@33:     return list
        ['  File "e:\\python\\flagicon48.py", line 244, in ?\n    appuifw.app.body = appuifw.Listbox(entries)\n']
    === RETURN c:\resource\traceback.py	format_tb@57:     return format_list(extract_tb(tb, limit))
        ['  File "e:\\python\\flagicon48.py", line 244, in ?\n    appuifw.app.body = appuifw.Listbox(entries)\n']
    'SymbianError'-(-1, 'KErrNotFound')-['  File "e:\\python\\flagicon48.py", line 244, in ?\n    appuifw.app.body = appuifw.Listbox(entries)\n']
    
    222222
    So the line appuifw.app.body = appuifw.Listbox(entries) caused an Exception when running in N82! I just can't figure out what could be wrong... As far as I can tell appuifw does exist, entries (already made as global variable) exists, even appuifw.app.body should exist. What on earth is "not found" ?!?!? What else is there that could be missing? And why only in real device? Everything else works ok... Yep, just tested 10 other scripts, no problems!

    Well, I'm writing this hoping that a) someone might be able to suggest ANYTHING and b) usually I figure out the problem/solution, when describing it to someone else.

    Feeling lucky,

    --jouni going to simplify the code even more rautalanka level

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: SymbianError -1, KErrNotFound

    Huh2,

    The magic works everytime, problem solved! Got fooled by trace output, which seemed to be ok. Turned out "entries" contained corrupted data, which just happened to look like real thing...

    This weekend I'll release new sample code, which shows how to populate listbox with your own icons from your own MBM file. Yep, pretty boring. Not worth releasing at all. However the MBM contains 244 free-to-use and ready-to-use country flags, resolution 48x48 bits. Best of all, not drawn by me

    Ok, there are some issues. Got to add link to icons' original website, flags share same mask which naturally doesn't fit all etc. Still pretty nice, I would say.

    Cheers,

    --jouni going to remove several hundreds of debug code and hoping everything would still work

  3. #3
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,800

    Re: SymbianError -1, KErrNotFound

    Quote Originally Posted by JOM View Post
    Got fooled by trace output, which seemed to be ok. Turned out "entries" contained corrupted data, which just happened to look like real thing...
    Hm..I once was fooled by an empty element in the list. It irritates when such petty things cause delay.

    //Croozeus
    Pankaj Nathani
    www.croozeus.com

Similar Threads

  1. CAudioOutput -> KErrNotFound
    By heuven in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2009-01-15, 11:32
  2. ImportContactsL leave with KErrNotFound
    By Shilpa13 in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2008-01-29, 18:54
  3. error KErrNotFound in MvpuoPrepareComplete
    By drizztdo in forum Symbian Media (Closed)
    Replies: 6
    Last Post: 2006-11-28, 09:51
  4. KErrNotFound with RSocket.connect
    By penthalis in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-05-26, 20:56
  5. Replies: 3
    Last Post: 2004-04-20, 16:23

Posting Permissions

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