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:
Emulator trace: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"
As you can see, no problems whatsoever! But here's N82 trace:Code:111111 <module 'appuifw' from 'c:\resource\appuifw.py'> <Application object at 0x314f6198> <appuifw.Listbox object at 0x31510750> 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!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
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

Reply With Quote




