Thawab fails to start: cannot import name 'escape' from 'cgi'

Bug #2003544 reported by Jeremy Bícha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
thawab (Debian)
Fix Committed
Unknown
thawab (Ubuntu)
Triaged
High
Unassigned
Jammy
Triaged
High
Unassigned
Kinetic
Won't Fix
High
Unassigned

Bug Description

Impact
------
The Thawab app doesn't start.

ImportError: cannot import name 'escape' from 'cgi' (/usr/lib/python3.10/cgi.py)

Python 3.8 dropped the 'escape' function from cgi; we need to import it from 'html' instead.

After that issue is fixed, there is another issue:
$ thawab-gtk
Traceback (most recent call last):
  File "/usr/bin/thawab-gtk", line 5, in <module>
    from Thawab.gtkUi import main
  File "/usr/share/thawab/Thawab/gtkUi.py", line 35, in <module>
    from Thawab.shamelaUtils import ShamelaSqlite, shamelaImport
  File "/usr/share/thawab/Thawab/shamelaUtils.py", line 51, in <module>
    os.urandom(hashlen*3/4).encode('base64')[:hashlen]
TypeError: 'float' object cannot be interpreted as an integer

Test Case
---------
Install Thawab.

The app should run. (The command-line name is thawab-gtk)

What Could Go Wrong
-------------------
The app doesn't start currently, so it can't really get any worse.

Other Info
----------
Thawab has a dependency, okasha, that also needs the html escape import fix. This is fixed in okasha 0.3.0.

Tags: jammy kinetic
Jeremy Bícha (jbicha)
Changed in thawab (Ubuntu Jammy):
status: New → In Progress
importance: Undecided → High
Changed in thawab (Ubuntu Kinetic):
importance: Undecided → High
status: New → In Progress
Jeremy Bícha (jbicha)
Changed in thawab (Ubuntu):
status: Fix Committed → Triaged
Changed in thawab (Ubuntu Jammy):
status: In Progress → Triaged
Changed in thawab (Ubuntu Kinetic):
status: In Progress → Triaged
Jeremy Bícha (jbicha)
description: updated
Changed in thawab (Debian):
status: Unknown → New
Changed in thawab (Debian):
status: New → Fix Released
Changed in thawab (Debian):
status: Fix Released → Fix Committed
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Ubuntu 22.10 (Kinetic Kudu) has reached end of life, so this bug will not be fixed for that specific release.

Changed in thawab (Ubuntu Kinetic):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.