** Summary changed: - anki crashed with ModuleNotFoundError in Noble + [SRU] anki crashed with ModuleNotFoundError in Noble
** Description changed: - anki fails to run with the error: + [ Impact ] - $ anki + anki will crash immediately when executed by any user. The error + displayed is: + + $ anki Traceback (most recent call last): File "/usr/bin/anki", line 6, in <module> import aqt File "/usr/share/anki/aqt/__init__.py", line 4, in <module> from anki import version as _version File "/usr/share/anki/anki/__init__.py", line 14, in <module> from anki.storage import Collection File "/usr/share/anki/anki/storage.py", line 13, in <module> from anki.collection import _Collection File "/usr/share/anki/anki/collection.py", line 26, in <module> from anki.sound import stripSounds File "/usr/share/anki/anki/sound.py", line 89, in <module> from anki.mpv import MPV, MPVBase File "/usr/share/anki/anki/mpv.py", line 39, in <module> from distutils.spawn import find_executable # pylint: disable=import-error,no-name-in-module ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ModuleNotFoundError: No module named 'distutils' + + + [ Test Plan ] + + install anki. + execute anki from terminal + + If the package is not fixed it will result in the above error. + + With the fixed package, it will start and will display the language choice menu. + After language is selected, Anki screen will be displayed. + + [ Where problems could occur ] + + The use of find_executable from distutils has been replaced with which() from shutil. This is not an upstream patch as upstream has completely modified the code. + "which" should work similar to find_executable, both returns the path of the executable and so chances of regression due to this change is very less. + + [ Other Info ] + + From the Debian bug, it seems the Debian maintainer does not intend to + remove distutils as there are already some more RC bugs. Packaging the + new upstream version in Debian will automatically remove the distutils + dependency in Debian. + + [ Original Bug Description ] + + anki fails to run with the error: + + $ anki + Traceback (most recent call last): + File "/usr/bin/anki", line 6, in <module> + import aqt + File "/usr/share/anki/aqt/__init__.py", line 4, in <module> + from anki import version as _version + File "/usr/share/anki/anki/__init__.py", line 14, in <module> + from anki.storage import Collection + File "/usr/share/anki/anki/storage.py", line 13, in <module> + from anki.collection import _Collection + File "/usr/share/anki/anki/collection.py", line 26, in <module> + from anki.sound import stripSounds + File "/usr/share/anki/anki/sound.py", line 89, in <module> + from anki.mpv import MPV, MPVBase + File "/usr/share/anki/anki/mpv.py", line 39, in <module> + from distutils.spawn import find_executable # pylint: disable=import-error,no-name-in-module + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'distutils' ProblemType: Crash DistroRelease: Ubuntu 24.04 Package: anki 2.1.15+dfsg-3ubuntu4 ProcVersionSignature: Ubuntu 6.8.0-22.22-generic 6.8.1 Uname: Linux 6.8.0-22-generic x86_64 ApportVersion: 2.28.0-0ubuntu1 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Wed Apr 17 21:33:16 2024 ExecutablePath: /usr/bin/anki InstallationDate: Installed on 2024-04-10 (7 days ago) InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Beta amd64 (20240410) InterpreterPath: /usr/bin/python3.12 PackageArchitecture: all ProcCmdline: /usr/bin/python3 /usr/bin/anki Python3Details: /usr/bin/python3.12, Python 3.12.3, python3-minimal, 3.12.3-0ubuntu1 PythonArgs: ['/usr/bin/anki'] PythonDetails: N/A SourcePackage: anki Title: anki crashed with ModuleNotFoundError in /usr/share/anki/anki/mpv.py: No module named 'distutils' UpgradeStatus: No upgrade log present (probably fresh install) UserGroups: adm cdrom dip lpadmin plugdev sudo users -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2062064 Title: [SRU] anki crashed with ModuleNotFoundError in Noble To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/anki/+bug/2062064/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs