Reply
Thread Tools
jukzh's Avatar
Posts: 122 | Thanked: 22 times | Joined on Jun 2010 @ China
#1
I'm busy creating an icon launcher for GMapcatcher
Launch as root:
Code:
~ $ root
Root shell enabled


BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/user # gmaps
/usr/bin/gmaps: line 3:  1664 Quit                    /usr/bin/python /media/mmc1/GMapCatcher-0.7.2.0/maps.py
Everything ok, now as user:
Code:
~ $ gmaps 
Traceback (most recent call last):
  File "/media/mmc1/GMapCatcher-0.7.2.0/maps.py", line 967, in <module>
    main()
  File "/media/mmc1/GMapCatcher-0.7.2.0/maps.py", line 963, in main
    MainWindow()
  File "/media/mmc1/GMapCatcher-0.7.2.0/maps.py", line 959, in __init__
    self.drawing_area.da_set_cursor()
  File "/media/mmc1/GMapCatcher-0.7.2.0/gmapcatcher/widDrawingArea.py", line 30, in da_set_cursor
    self.window.set_cursor(cursor)
AttributeError: 'NoneType' object has no attribute 'set_cursor'
^Z[1] + Stopped                    gmaps
~ $
Failed, why?
Same python same script
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#2
While launching it as root you didn't the Maemo look and feel.

But here the problem is that your window is a None type... haven't be created. Without source ... we can 't help you.

Python script doesn't need root to run ...
 
jukzh's Avatar
Posts: 122 | Thanked: 22 times | Joined on Jun 2010 @ China
#3
Originally Posted by Khertan View Post
While launching it as root you didn't the Maemo look and feel.

But here the problem is that your window is a None type... haven't be created. Without source ... we can 't help you.

Python script doesn't need root to run ...
Maemo look and feel, sorry what is that?
Source, it's quite big to post, you can check it out:
Code:
svn checkout http://gmapcatcher.googlecode.com/svn/trunk/ gmapcatcher-read-only
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#4
Your set_cursor methods seems to be called before that the DrawingArea got his expose event so he didn't have any window yet as it s not well configurated yet.

can you try to set the cursor only if DrawingArea.window != None ?
 
jukzh's Avatar
Posts: 122 | Thanked: 22 times | Joined on Jun 2010 @ China
#5
Originally Posted by Khertan View Post
Your set_cursor methods seems to be called before that the DrawingArea got his expose event so he didn't have any window yet as it s not well configurated yet.

can you try to set the cursor only if DrawingArea.window != None ?
Where I supposed to do that?
 
Reply


 
Forum Jump


All times are GMT. The time now is 03:07.