[Sugar-devel] no module named sugar.activity.activity
Abhishek Tanwar
abhishektanwar184 at gmail.com
Wed Jan 29 03:07:30 EST 2020
Sorry I posted the wrong traceback by mistake. Here is the traceback I
wanted to post . I am really sorry
Traceback (most recent call last):
File "/usr/bin/sugar-activity", line 219, in <module>
main()
File "/usr/bin/sugar-activity", line 163, in main
module = _import_(module_name)
File "/usr/share/sugar/activities/Arithmetic.activity/arithmetic.py",
line 28, in <module>
import dobject.groupthink.sugar_tools as sugar_tools
File
"/usr/share/sugar/activities/Arithmetic.activity/dobject/groupthink/sugar_tools.py",
line 20, in <module>
from sugar.activity.activity import Activity, ActivityToolbox
ImportError: No module named sugar.activity.activity
On Wed, Jan 29, 2020 at 1:30 PM Chihurumnaya Ibiam <
ibiamchihurumnaya at gmail.com> wrote:
> 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 <abhishektanwar184 at 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 at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20200129/2213a34b/attachment.htm>
More information about the Sugar-devel
mailing list