[Sugar-devel] Debian Advocacy Update - Errors in Calculate on Debian Bullseye
James Cameron
quozl at laptop.org
Tue Jun 30 18:46:01 EDT 2020
Some of what Shaan has seen on Debian Testing and Saumya has
reproduced on Ubuntu 20.04 is most likely caused by the newer version
of GTK, but neither of you reported the version of GTK.
Debian stable has GTK 3.24.5
Ubuntu 20.04 has GTK 3.24.18
Debian unstable has GTK 3.24.20
You should look at the release notes for GTK between 3.24.5 and
3.24.20.
By the way, "Don't know color" is in GTK 3.24.18 source code seven
times, in four different widget implementations. You will need to
find which widget reported this. Also, why is it that a string value
has what looks like source code; perhaps a Gdk.Color has been coerced
to string by mistake.
@Saumya, please don't open issues if you plan to solve the errors. It
is a waste of notifications and achieves nothing. Just open pull
requests, one per problem.
On Wed, Jul 01, 2020 at 01:04:18AM +0530, Saumya Mishra wrote:
>
> Hello Shaan!!
>
> Nice work.
> I have also tested Calculate version 46-1 with Ubuntu 20.04 sucrose package
> version 0.117.
> All the Errors are reproducible.
>
> 1. Warning when attempting to calculate and expression ( pressing ‘=’ )
>
> 65535 = (Binary) 1111111111111111 = (Hexadecimal) FFFF
>
> Gtk-WARNING **: 19:47:57.736: Don't know color 'Gdk.Color(red=6553
> 5, green=65535, blue=65535)'
>
> Workaround is to use Gdk.RGBA as Gdk.Color is deprecated and will not work with
> newer versions of Ubuntu and Debian.
>
> 1. Error when using ‘pi’ and ‘e’ in expression:
>
> 1593526849.741283 ERROR root: Internal error (<class 'UnboundLocalError'>): local variable
> 'list' referenced before assignment
> Traceback (most recent call last):
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 674, in evaluat
> e
> ret = self._process_node(eqn, state)
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 444, in _proces
> s_node
> return self._process_node(node.value, state)
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 515, in _proces
> s_node
> if [1]node.id not in list(state.used_var_ofs.keys()):
> UnboundLocalError: local variable 'list' referenced before assignment
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/usr/share/sugar/activities/Calculate.activity/layout.py", line 133, in <lambda>
> lambda w: self._parent.process()],
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 518, in process
> res = self.parser.evaluate(tree)
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 680, in evaluat
> e
> raise ParseError(msg, 0)
> TypeError: __init__() missing 1 required positional argument: 'eqn'Reproducible on Ubuntu 20.04
>
> 1. Hovering over Algebraic, Trigonometric toolbar buttons throws:
>
> (sugar-activity3:1791): Gtk-WARNING **: 19:54:34.278: Drawing a gadget with negative dimen
> sions. Did you forget to allocate a size? (node menuitem owner SugarPaletteHeader)-- Warning is Reproducible
>
> 1. Submitting trigonometric functions without values displays an error in the
> Activity but only the first character is highlighted red instead of the
> full function. -- Reproducible on Ubuntu 20.04
>
> 2. Submitting logical expressions without values throws:
>
> 1593527432.306449 DEBUG Calculate: Result: ParseError('Parse error', 6, 'True!=')
> Traceback (most recent call last):
> File "/usr/share/sugar/activities/Calculate.activity/layout.py", line 133, in <lambda>
> lambda w: self._parent.process()],
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 552, in process
> self.set_error_equation(eqn)
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 444, in set_err
> or_equation
> self.set_last_equation(eqn)
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 439, in set_las
> t_equation
> self.layout.last_eq.set_buffer(eqn.create_lasteq_textbuf())
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 219, in create_
> lasteq_textbuf
> resstr = str(self.result)
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 75, in __str__
> msg = _("Error at '%(a)', position: %(b)") % \
> ValueError: unsupported format character ''' (0x27) at index 14
>
> Reproducile on Ubuntu 20.04 -- We need to implement Exception handlers
>
> 1. Submitting / pressing ‘=’ without entering any value throws
>
> 1593527598.469328 DEBUG root: Parsing preprocessed equation: ''
> Traceback (most recent call last):
> File "/usr/share/sugar/activities/Calculate.activity/layout.py", line 133, in <lambda>
> lambda w: self._parent.process()],
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 517, in process
> tree = self.parser.parse(s)
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 656, in parse
> raise ParseError(msg)
> TypeError: __init__() missing 2 required positional arguments: 'start' and 'eqn'Reproducile on Ubuntu 20.04 -- We need to implement Exception handlers
>
> I will now move forward with solving these errors and opening issues.
> Thanks
> Saumya
>
> On Tue, Jun 30, 2020 at 11:04 PM [2]shaansubbaiah.cs18 at bmsce.ac.in <[3]
> shaansubbaiah.cs18 at bmsce.ac.in> wrote:
>
> Hello James,
> While testing Sugar 0.117-3 on Debian Bullseye (11 / testing) I have found
> numerous errors which were not present while testing on Debian Buster (10 /
> stable).
> Both versions of the activity are the same, 46. There have been a few
> changes made a week back:
>
> □ fix recommend python3-matplotlib (not python-matplotlib); closes: bug#
> 938584, thanks to Sandro Tosi * fix provide ${python3:Provides} (not $
> {python:Provides})
>
> I will investigate further and report back.
>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
>
> Calculate
>
> 1. Warning when ateempting to calculate and expression ( pressing ‘=’ )
>
> 65535 = (Binary) 1111111111111111 = (Hexadecimal) FFFF
>
> Gtk-WARNING **: 19:47:57.736: Don't know color 'Gdk.Color(red=6553
> 5, green=65535, blue=65535)'
>
> 1. Error when using ‘pi’ and ‘e’ in expression:
>
> 1593526849.741283 ERROR root: Internal error (<class 'UnboundLocalError'>): local variable
> 'list' referenced before assignment
> Traceback (most recent call last):
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 674, in evaluat
> e
> ret = self._process_node(eqn, state)
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 444, in _proces
> s_node
> return self._process_node(node.value, state)
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 515, in _proces
> s_node
> if [4]node.id not in list(state.used_var_ofs.keys()):
> UnboundLocalError: local variable 'list' referenced before assignment
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/usr/share/sugar/activities/Calculate.activity/layout.py", line 133, in <lambda>
> lambda w: self._parent.process()],
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 518, in process
> res = self.parser.evaluate(tree)
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 680, in evaluat
> e
> raise ParseError(msg, 0)
> TypeError: __init__() missing 1 required positional argument: 'eqn'
>
> 1. Hovering over Algebraic, Trigonometric toolbar buttons throws:
>
> (sugar-activity3:1791): Gtk-WARNING **: 19:54:34.278: Drawing a gadget with negative dimen
> sions. Did you forget to allocate a size? (node menuitem owner SugarPaletteHeader)
>
> 1. Submitting trigonometric functions without values displays an error in
> the Activity but only the first character is highlighted red instead of
> the full function.
>
> 2. Submitting logical expressions without values throws:
>
> 1593527432.306449 DEBUG Calculate: Result: ParseError('Parse error', 6, 'True!=')
> Traceback (most recent call last):
> File "/usr/share/sugar/activities/Calculate.activity/layout.py", line 133, in <lambda>
> lambda w: self._parent.process()],
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 552, in process
> self.set_error_equation(eqn)
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 444, in set_err
> or_equation
> self.set_last_equation(eqn)
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 439, in set_las
> t_equation
> self.layout.last_eq.set_buffer(eqn.create_lasteq_textbuf())
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 219, in create_
> lasteq_textbuf
> resstr = str(self.result)
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 75, in __str__
> msg = _("Error at '%(a)', position: %(b)") % \
> ValueError: unsupported format character ''' (0x27) at index 14
>
> 1. Submitting / pressing ‘=’ without entering any value throws
>
> 1593527598.469328 DEBUG root: Parsing preprocessed equation: ''
> Traceback (most recent call last):
> File "/usr/share/sugar/activities/Calculate.activity/layout.py", line 133, in <lambda>
> lambda w: self._parent.process()],
> File "/usr/share/sugar/activities/Calculate.activity/calculate.py", line 517, in process
> tree = self.parser.parse(s)
> File "/usr/share/sugar/activities/Calculate.activity/astparser.py", line 656, in parse
> raise ParseError(msg)
> TypeError: __init__() missing 2 required positional arguments: 'start' and 'eqn'
>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
>
> Best,
> Shaan
>
> _______________________________________________
> Sugar-devel mailing list
> [5]Sugar-devel at lists.sugarlabs.org
> [6]http://lists.sugarlabs.org/listinfo/sugar-devel
>
> *
>
> References:
>
> [1] http://node.id/
> [2] mailto:shaansubbaiah.cs18 at bmsce.ac.in
> [3] mailto:shaansubbaiah.cs18 at bmsce.ac.in
> [4] http://node.id/
> [5] mailto:Sugar-devel at lists.sugarlabs.org
> [6] http://lists.sugarlabs.org/listinfo/sugar-devel
--
James Cameron
http://quozl.netrek.org/
More information about the Sugar-devel
mailing list