<div dir="auto">The traceback you posted shows you didn't import Gdk but used it, make sure Gdk is imported.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020, 8:33 AM Abhishek Tanwar <<a href="mailto:abhishektanwar184@gmail.com" target="_blank" rel="noreferrer">abhishektanwar184@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am trying to port <a href="https://github.com/sugarlabs/arithmetic" rel="noreferrer noreferrer" target="_blank">https://github.com/sugarlabs/arithmetic</a> 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 .<br><br>Traceback (most recent call last):<br> File "/usr/bin/sugar-activity", line 219, in <module><br> main()<br> File "/usr/bin/sugar-activity", line 214, in main<br> instance = create_activity_instance(activity_constructor, activity_handle)<br> File "/usr/bin/sugar-activity", line 48, in create_activity_instance<br> activity = constructor(handle)<br> File "/usr/share/sugar/activities/compress-activity.activity/Compress.py", line 42, in _init_<br> canvas = PyApp()<br> File "/usr/share/sugar/activities/compress-activity.activity/CompressCanvas3.py", line 504, in _init_<br> if Gdk.Screen.width() >= 1200:<br>NameError: global name 'Gdk' is not defined<br>Exited with status 1, pid 1692 data (<open file '<fdopen>', mode 'w' at 0x7f0fd82a3ae0>, 'f5b6d864dcbea56c6345d8d0394716abe77d46e7')<br><br><br>I setup my development environment by following <a href="https://github.com/sugarlabs/sugar/blob/master/docs/ubuntu.md" rel="noreferrer noreferrer" target="_blank">https://github.com/sugarlabs/sugar/blob/master/docs/ubuntu.md</a> and I am working on ubuntu 18.04.</div>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" rel="noreferrer noreferrer" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" rel="noreferrer noreferrer noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</blockquote></div>