With the usb cable connected between your phone and desktop, run
adb logcat |grep python
Here's the output I got today.
I/python ( 580): Opening APK '/data/app/org.pychildren.surfsc-2.apk'I/python ( 580): Traceback (most recent call last):I/python ( 580): File "main.py", line 323, in <module>I/python ( 580): main()I/python ( 580): File "main.py", line 296, in mainI/python ( 580): pprint.pprint(weather.w_dict)I/python ( 580): NameError: global name 'pprint' is not definedI/python ( 580): Python for android ended.I/ActivityManager( 7163): Process org.pychildren.surfsc:python (pid 580) has died.
It is clear that there's a problem with the pprint.pprint statement that I was using to display the Python dictionary of weather data. It even gives me the line number in my source code. I simply commented out the line and the app started working again on my Android phone.
I've added basic weather information to my version. My son's version has a cleaner interface and better colors.
No comments:
Post a Comment