[Sugar-devel] Contribution to SUGARLABS

James Cameron quozl at laptop.org
Wed Jan 22 22:21:14 EST 2020


You haven't got GTK 2 installed yet, on your VM.  I can't be specific
about how to install it, because I don't know what operating system
you are using in the VM.

Immediately after that, you will also face
https://github.com/sugarlabs/arithmetic/issues/3

On Thu, Jan 23, 2020 at 04:26:48AM +0530, Abhishek Tanwar wrote:
> I am trying to port the Arithmetic activity to GTK+3 . I downloaded the
> repository and ran it (GTK version) so that I can see the interface and make
> the same using GTK+3 but it doesnt work.
> Here are the logs when I run this activity on my sugar desktop on my VM.
> I am not able to understand the errors,if anyone could show me the direction
> .It would be much appreciated.
> 
> Thank You
> 
> <type 'exceptions.ImportError'>
> Python 2.7.17: /usr/bin/python
> Thu Jan 23 04:13:18 2020
> 
> A problem occurred in a Python script.  Here is the sequence of
> function calls leading up to the error, in the order they occurred.
> 
>  /usr/bin/sugar-activity in <module>()
>   215
>   216     if hasattr(instance, 'run_main_loop'):
>   217         instance.run_main_loop()
>   218
>   219 main()
> main = <function main>
> 
>  /usr/bin/sugar-activity in main()
>   161     class_name = splitted_module[1]
>   162
>   163     module = __import__(module_name)
>   164     for comp in module_name.split('.')[1:]:
>   165         module = getattr(module, comp)
> module undefined
> builtin__import__ = <built-in function __import__>
> module_name = 'arithmetic'
> 
>  /usr/share/sugar/activities/Arithmetic.activity/arithmetic.py in <module>()
>    15
>    16 import logging
>    17 import gtk
>    18 import pango
>    19 import random
> gtk undefined
> <type 'exceptions.ImportError'>: No module named gtk
>     __class__ = <type 'exceptions.ImportError'>
>     __delattr__ = <method-wrapper '__delattr__' of exceptions.ImportError
> object>
>     __dict__ = {}
>     __doc__ = "Import can't find module, or can't find name in module."
>     __format__ = <built-in method __format__ of exceptions.ImportError object>
>     __getattribute__ = <method-wrapper '__getattribute__' of
> exceptions.ImportError object>
>     __getitem__ = <method-wrapper '__getitem__' of exceptions.ImportError
> object>
>     __getslice__ = <method-wrapper '__getslice__' of exceptions.ImportError
> object>
>     __hash__ = <method-wrapper '__hash__' of exceptions.ImportError object>
>     __init__ = <method-wrapper '__init__' of exceptions.ImportError object>
>     __new__ = <built-in method __new__ of type object>
>     __reduce__ = <built-in method __reduce__ of exceptions.ImportError object>
>     __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.ImportError
> object>
>     __repr__ = <method-wrapper '__repr__' of exceptions.ImportError object>
>     __setattr__ = <method-wrapper '__setattr__' of exceptions.ImportError
> object>
>     __setstate__ = <built-in method __setstate__ of exceptions.ImportError
> object>
>     __sizeof__ = <built-in method __sizeof__ of exceptions.ImportError object>
>     __str__ = <method-wrapper '__str__' of exceptions.ImportError object>
>     __subclasshook__ = <built-in method __subclasshook__ of type object>
>     __unicode__ = <built-in method __unicode__ of exceptions.ImportError
> object>
>     args = ('No module named gtk',)
>     message = 'No module named gtk'
> 
> The above is a description of an error in a Python program.  Here is
> the original traceback:
> 
> 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
> 17, in <module>
>     import gtk
> ImportError: No module named gtk
> 
> Exited with status 1, pid 1675 data (<open file '<fdopen>', mode 'w' at
> 0x7f28d7dbc780>, 'e1df43f3e9571a85b2dc8b025ba334c83eff39ea')
> 
> On Tue, Jan 21, 2020 at 6:52 PM Walter Bender <[1]walter.bender at gmail.com>
> wrote:
> 
>     On Tue, Jan 21, 2020 at 6:15 AM Abhishek Tanwar <[2]
>     abhishektanwar184 at gmail.com> wrote:
> 
>         Hello sir
>         Thank you for your response and valuable information . I have found these
>         [3]https://github.com/sugarlabs/arithmetic/issues/4 and
>         [4]https://github.com/sugarlabs/Bounce
>         activities and I feel comfortable with the code and I want to port this
>         activity to GTK +3.
> 
>         Is there any certain procedure that I am supposed to follow in order to
>         contribute to these two tasks or can I straight away start with it.
> 
>     [5]https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md
>      should have all the information you need.
> 
>     regards.
> 
>     -walter
> 
>         Thank you
> 
>         _______________________________________________
>         Sugar-devel mailing list
>         [6]Sugar-devel at lists.sugarlabs.org
>         [7]http://lists.sugarlabs.org/listinfo/sugar-devel
> 
>     --
>     Walter Bender
>     Sugar Labs
>     [8]http://www.sugarlabs.org
>     [9]
> 
> References:
> 
> [1] mailto:walter.bender at gmail.com
> [2] mailto:abhishektanwar184 at gmail.com
> [3] https://github.com/sugarlabs/arithmetic/issues/4
> [4] https://github.com/sugarlabs/Bounce
> [5] https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md
> [6] mailto:Sugar-devel at lists.sugarlabs.org
> [7] http://lists.sugarlabs.org/listinfo/sugar-devel
> [8] http://www.sugarlabs.org/
> [9] http://www.sugarlabs.org/


> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


-- 
James Cameron
http://quozl.netrek.org/


More information about the Sugar-devel mailing list