Encounter "urwid.canvas.CanvasError: Canvas text is wider than the maxcol specified"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bugit |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Was using copy and paste from summary to another field and encountered qabro unexpected exit and got traceback as below
=========
u@u-HP-
Traceback (most recent call last):
File "/snap/
load_
File "/snap/
start_ui()
File "/snap/
ui.run()
File "/snap/
self.loop.run()
File "/snap/
self._run()
File "/snap/
self.
File "/snap/
self._loop()
File "/snap/
self.
File "/snap/
callback()
File "/snap/
self.
File "/snap/
canvas = self._topmost_
File "/snap/
canv = fn(self, size, focus=focus)
File "/snap/
focus and self.focus_part == 'body')
File "/snap/
canv = fn(self, size, focus=focus)
File "/snap/
canv = self._original_
File "/snap/
canv = fn(self, size, focus=focus)
File "/snap/
canv = w.render((maxcol,), focus=focus and item_focus)
File "/snap/
canv = fn(self, size, focus=focus)
File "/snap/
canv = get_delegate(
File "/snap/
canv = fn(self, size, focus=focus)
File "/snap/
canv = w.render((maxcol,), focus=focus and item_focus)
File "/snap/
canv = fn(self, size, focus=focus)
File "/snap/
focus = focus and self.focus_position == i)
File "/snap/
canv = fn(self, size, focus=focus)
File "/snap/
canv = Text.render(
File "/snap/
canv = fn(self, size, focus=focus)
File "/snap/
return apply_text_
File "/snap/
return TextCanvas(t, a, c, maxcol=maxcol)
File "/snap/
raise CanvasError("Canvas text is wider than the maxcol specified \n%r\n%
urwid.canvas.
96
[8, 93, 5, 19, 52, 16, 47, 14, 98, 4, 13]
[b'Summary: ', b"[cmit] Audio input not work, System can detected the 3 ring earphone plugged but doesn't have ", b'input ', b'Steps to reproduce: ', b'1. Plug 3 ring earphone with mic to appropriate jack ', b'Expected result: ', b'System can be recording audio from external mic ', b'Actual result: ', b"Audio input not work, System can detected the 3 ring earphone plugged but doesn't have ???put ", b' ', b'Failure rate:']
Related branches
- Maciej Kisielewski (community): Approve
-
Diff: 52 lines (+23/-2)2 files modifiedqabro/__version__.py (+1/-1)
snap/snapcraft.yaml (+22/-1)
Changed in qabro: | |
milestone: | none → 0.9 |
importance: | Undecided → Medium |
Changed in qabro: | |
status: | Triaged → Fix Committed |
Changed in qabro: | |
status: | Fix Committed → Fix Released |
The issue happens because you've tried to paste unicode characters (in that case, the "┌───" characters that surrounds the different text fields).
I've tested the following:
1. Launch qabro
2. Try to paste a Unicode character (for instance "好")
With the snap version of qabro, it prints "???", but when I test qabro outside of snap, it works.
I investigated a bit and found that urwid (the library qabro uses to handle the user interface) checks the locale to see if it can use Unicode. Apparently, from within the snap, it fails (urwid returns `narrow` instead of `utf8`).
I need to find a way to fix this.