Virtaal is broken out-of-the-box on Ubuntu 20.04 LTS

Bug #2003874 reported by Mikko Rantalainen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virtaal (Ubuntu)
New
Undecided
Unassigned

Bug Description

Virtaal is totally broken and cannot be used to modify .po files on Ubuntu 20.04 LTS.

The biggest problem seems to be missing following line in /usr/lib/python3/dist-packages/virtaal/support/set_enumerator.py:

    from functools import reduce

This line is needed before reduce() is used because Guido van van Rossum didn't like it and forced to move it to another namespace.

Even if that's fixed, there are so many other problems that Virtaal cannot be used to actually modify .po files in practice. If you open it in a terminal and look at the terminal output, you'll surely see it.

Some examples:

NameError: name 'reduce' is not defined
/usr/lib/python3/dist-packages/gi/overrides/Gtk.py:1632: Warning: g_value_type_compatible: assertion 'src_type' failed
  return _Gtk_main(*args, **kwargs)
/usr/lib/python3/dist-packages/virtaal/views/mainview.py:551: Warning: g_value_type_compatible: assertion 'src_type' failed
  Gtk.main_iteration()

ERROR:root:Failed to start TM server
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtaal/plugins/tm/models/localtm.py", line 78, in __init__
    self.tmserver = subprocess.Popen(command)
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'tmserver'
ERROR:root:Failed to load plugin "localtm"
[Errno 2] No such file or directory: 'tmserver'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtaal/controllers/plugincontroller.py", line 117, in enable_plugin
    self.plugins[name] = plugin_class(name, self.controller)
  File "/usr/lib/python3/dist-packages/virtaal/plugins/tm/models/localtm.py", line 78, in __init__
    self.tmserver = subprocess.Popen(command)
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'tmserver'

I guess it's an improvement compared to Ubuntu 18.04 LTS where Virtaal didn't even start at all but having this kind of broken package in Ubuntu is no good.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: virtaal 0.7.1+git20191021+ds1-1 [modified: usr/lib/python3/dist-packages/virtaal/support/set_enumerator.py]
ProcVersionSignature: Ubuntu 5.15.0-58.64~20.04.1-lowlatency 5.15.74
Uname: Linux 5.15.0-58-lowlatency x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.25
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: MATE
Date: Wed Jan 25 16:53:53 2023
EcryptfsInUse: Yes
InstallationDate: Installed on 2019-01-05 (1480 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
PackageArchitecture: all
SourcePackage: virtaal
UpgradeStatus: Upgraded to focal on 2022-09-13 (133 days ago)
modified.conffile..etc.init.d.apport: [modified]
mtime.conffile..etc.init.d.apport: 2022-05-19T12:50:20.029158

Revision history for this message
Mikko Rantalainen (mira) wrote :
Revision history for this message
Mikko Rantalainen (mira) wrote :

This broken with Ubuntu 22.04 LTS, too. This time the failure happens here:

ERROR:root:MainController.open_file(filename="locale/fi.po", uri="")
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtaal/controllers/maincontroller.py", line 210, in open_file
    self.store_controller.open_file(filename, uri, forget_dir=forget_dir)
  File "/usr/lib/python3/dist-packages/virtaal/controllers/storecontroller.py", line 227, in open_file
    self.store = StoreModel(filename, self)
  File "/usr/lib/python3/dist-packages/virtaal/models/storemodel.py", line 62, in __init__
    self.load_file(fileobj)
  File "/usr/lib/python3/dist-packages/virtaal/models/storemodel.py", line 149, in load_file
    self.update_stats(filename=filename)
  File "/usr/lib/python3/dist-packages/virtaal/models/storemodel.py", line 172, in update_stats
    from translate.storage import statsdb
ImportError: cannot import name 'statsdb' from 'translate.storage' (/usr/lib/python3/dist-packages/translate/storage/__init__.py)
ERROR:root:Failed to load plugin "migration"
Could not find plug-in "migration"
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtaal/controllers/plugincontroller.py", line 115, in enable_plugin
    plugin_class = self._get_plugin_class(name)
  File "/usr/lib/python3/dist-packages/virtaal/controllers/plugincontroller.py", line 188, in _get_plugin_class
    raise Exception('Could not find plug-in "%s"' % (name))
Exception: Could not find plug-in "migration"
ERROR:root:Failed to load plugin "tm"
Could not find plug-in "tm"

If the maintainer cannot bother to even try opening a single .po file to do minimum level of QA before release, maybe the package should be removed for good?

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.