Not working on Debian 11
narcisgarcia opened this issue · comments
$ sudo apt install virtaal
(...) OK
$ virtaal
ERROR:root:Failed to load plugin "tm"
Could not find plug-in "tm"
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 "tm"
ERROR:root:Failed to load plugin "spellchecker"
No module named 'gtkspell'
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/spellchecker.py", line 70, in __init__
import gtkspell
ModuleNotFoundError: No module named 'gtkspell'
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"
TypeError: string argument expected, got 'bytes'
After these messages, application GUI is shown, but no button/link works. Output wen "Open" button is pressed:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtaal/views/welcomescreenview.py", line 126, in _on_button_clicked
self.controller.open_file()
File "/usr/lib/python3/dist-packages/virtaal/controllers/welcomescreencontroller.py", line 70, in open_file
self.main_controller.open_file(filename)
File "/usr/lib/python3/dist-packages/virtaal/controllers/maincontroller.py", line 188, in open_file
return self.view.open_file()
File "/usr/lib/python3/dist-packages/virtaal/views/mainview.py", line 540, in open_file
filename_and_uri = self.show_open_dialog()
File "/usr/lib/python3/dist-packages/virtaal/views/mainview.py", line 604, in show_open_dialog
last_path = (pan_app.settings.general["lastdir"] or "").decode(sys.getdefaultencoding())
AttributeError: 'str' object has no attribute 'decode'
It looks as if the Debian package is installed to work with Python 3. The released version of Virtaal does not work with Python 3 (only Python 2). Much work has been done to port it to Python 3, but no official release for Python 3 is available yet. Maybe take the issue up with the Debian maintainer of the package. Any help in getting things ready for another release would be welcome of course - my time has become very little.
I'm closing your report mainly because it is a known issue that is being addressed elsewhere.
$ apt-cache show virtaal
Package: virtaal
Version: 0.7.1+git20191021+ds1-2
Installed-Size: 4772
Maintainer: Debian l10n developers <debian-l10n-devel@lists.alioth.debian.org>
Architecture: all
Depends: gir1.2-gtk-3.0, python3-diff-match-patch, python3-gi, python3-lxml, python3-pycurl, python3-six, python3-translate, python3:any, libjs-sphinxdoc (>= 2.4.3-5~)
Recommends: libreoffice-common, python3-cheroot, python3-enchant, python3-levenshtein, python3-libproxy, python3-psycopg2
Description-en: graphical localisation editor and multi-format translation tool
Virtaal is a graphical localisation editor that is designed to offer the
translator an uncluttered interface for translating text. Virtaal supports a
wide variety of common formats including PO and XLIFF files (and everything
else that the translate-toolkit package supports).
Description-md5: 90a78b36d48848e7189a8bd426e9165d
Homepage: http://virtaal.translatehouse.org/
Tag: devel::i18n, implemented-in::python, interface::graphical,
interface::x11, role::program, scope::application, uitoolkit::gtk,
use::checking, use::converting, use::editing, works-with-format::po,
works-with::dictionary, x11::application
Section: python
Priority: optional
Filename: pool/main/v/virtaal/virtaal_0.7.1+git20191021+ds1-2_all.deb
Size: 1312364
MD5sum: 7dfa89f682d41e072f9891d13159c03f
SHA256: 9e9614cbf7ad26b55eb11aabc3d4a1bc459058e169bb7739be7bb99c491f681f
$ sudo apt install python2-minimal
(...) OK
$ python2 /usr/bin/virtaal
Traceback (most recent call last):
File "/usr/bin/virtaal", line 25, in <module>
from virtaal.common import pan_app
ImportError: No module named virtaal.common
$ head -n 30 /usr/bin/virtaal
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright 2007-2011 Zuza Software Foundation
# Copyright 2013,2015 F Wolff
#
# This file is part of Virtaal.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
import sys
from os import path
from virtaal.common import pan_app
# Some behaviour should vary, depending on whether Virtaal is packaged or not
packaged = getattr(sys, 'frozen', False)
# Distributions can just set this value to True, if dependencies are taken care
# of elsewhere:
Existing bug report on Debian Debian bug tracking system:
https://bugs.debian.org/997797
I've just downloaded now virtaal-0.7.1.tar.bz2 from Virtaal website, and I see it can't work on recent distros with python3 as default, because .py files shebang have no explicit reference to python2