crashes on start: ModuleNotFoundError: No module named 'gtts'

Bug #1875164 reported by themusicgod1
42
This bug affects 6 people
Affects Status Importance Assigned to Milestone
mnemosyne (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

running mnemosyne, after upgrading to focal:

themusicgod1@eva1:~$ mnemosyne
Log body:
 An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
  File "/usr/bin/mnemosyne", line 268, in <module>
    mnemosyne.initialise(data_dir=data_dir, filename=filename,
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/__init__.py", line 400, in initialise
    self.register_components()
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/__init__.py", line 465, in register_components
    importlib.import_module(module_name), class_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/pronouncers/google_pronouncer.py", line 5, in <module>
    from gtts import gTTS
 ModuleNotFoundError: No module named 'gtts'

An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
  File "/usr/bin/mnemosyne", line 268, in <module>
    mnemosyne.initialise(data_dir=data_dir, filename=filename,
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/__init__.py", line 400, in initialise
    self.register_components()
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/__init__.py", line 465, in register_components
    importlib.import_module(module_name), class_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/pronouncers/google_pronouncer.py", line 5, in <module>
    from gtts import gTTS
 ModuleNotFoundError: No module named 'gtts'
An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
  File "/usr/bin/mnemosyne", line 268, in <module>
    mnemosyne.initialise(data_dir=data_dir, filename=filename,
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/__init__.py", line 400, in initialise
    self.register_components()
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/__init__.py", line 465, in register_components
    importlib.import_module(module_name), class_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/pronouncers/google_pronouncer.py", line 5, in <module>
    from gtts import gTTS
 ModuleNotFoundError: No module named 'gtts'

themusicgod1@eva1:~$ apt-cache policy mnemosyne
mnemosyne:
  Installed: 2.7.1+ds-1
  Candidate: 2.7.1+ds-1
  Version table:
 *** 2.7.1+ds-1 500
        500 http://mirrors.layeronline.com/ubuntu focal/universe amd64 Packages
        500 http://mirrors.layeronline.com/ubuntu focal/universe i386 Packages
        100 /var/lib/dpkg/status

Ubuntu: 20.04 LTS focal

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: mnemosyne 2.7.1+ds-1
ProcVersionSignature: Ubuntu 5.4.0-26.30-lowlatency 5.4.30
Uname: Linux 5.4.0-26-lowlatency x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Sun Apr 26 04:12:03 2020
InstallationDate: Installed on 2017-04-18 (1103 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
PackageArchitecture: all
SourcePackage: mnemosyne
UpgradeStatus: Upgraded to focal on 2020-04-25 (0 days ago)

Revision history for this message
themusicgod1 (themusicgod1) wrote :
Revision history for this message
themusicgod1 (themusicgod1) wrote :

Looks like it needs a runtime dependency on python3-gtts - installed python3-gtts and mnemosyne started no problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mnemosyne (Ubuntu):
status: New → Confirmed
Revision history for this message
Ansgar Bohmann (ansgar-bohmann) wrote :

I can both confirm the problem itself as well as the fix mentioned in #2. It's just a missing dependency and simply installing python3-gtts fixes the problem.

Revision history for this message
Ansgar Bohmann (ansgar-bohmann) wrote :

Two day ago I had confirmed both the bug and workaround on Ubuntu 20.04 (Focal Fossa).

Meanwhile I upgraded to 20.10 (Groovy Gorilla) and can confirm the same behaviour there as well. If python3-gtts is not manually installed, mnemosyne crashes on startup with the reported message. After manual installation of python3-gtts, everything works as expected.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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