The traceback you posted shows you didn't import Gdk but used it, make sure Gdk is imported.
On Wed, Jan 29, 2020, 8:33 AM Abhishek Tanwar <abhishektanwar...@gmail.com> wrote: > I am trying to port https://github.com/sugarlabs/arithmetic to GTk3 but > when i run the activity to understand the working(with GTK) it throws an > error "no module named sugar.activity.activity".I searched google for any > potential solutions but could not find anything . > > Traceback (most recent call last): > File "/usr/bin/sugar-activity", line 219, in <module> > main() > File "/usr/bin/sugar-activity", line 214, in main > instance = create_activity_instance(activity_constructor, > activity_handle) > File "/usr/bin/sugar-activity", line 48, in create_activity_instance > activity = constructor(handle) > File > "/usr/share/sugar/activities/compress-activity.activity/Compress.py", line > 42, in _init_ > canvas = PyApp() > File > "/usr/share/sugar/activities/compress-activity.activity/CompressCanvas3.py", > line 504, in _init_ > if Gdk.Screen.width() >= 1200: > NameError: global name 'Gdk' is not defined > Exited with status 1, pid 1692 data (<open file '<fdopen>', mode 'w' at > 0x7f0fd82a3ae0>, 'f5b6d864dcbea56c6345d8d0394716abe77d46e7') > > > I setup my development environment by following > https://github.com/sugarlabs/sugar/blob/master/docs/ubuntu.md and I am > working on ubuntu 18.04. > _______________________________________________ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel >
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel