popup-dict icon indicating copy to clipboard operation
popup-dict copied to clipboard

启动失败

Open yatasun opened this issue 6 years ago • 10 comments

Traceback (most recent call last): File "/usr/bin/popup-dict", line 7, in from popupdict.main import main File "/usr/lib/python3.6/site-packages/popupdict/main.py", line 8, in from .gtk import * File "/usr/lib/python3.6/site-packages/popupdict/gtk/init.py", line 7, in Gst.init() TypeError: init() missing 1 required positional argument: 'argv'

yatasun avatar Aug 13 '18 09:08 yatasun

gstreamer 版本号是多少?

bianjp avatar Aug 13 '18 09:08 bianjp

1.14.2-1

yatasun avatar Aug 13 '18 10:08 yatasun

有点奇怪,你执行这些语句看下输出:

import gi
gi.require_version('Gst', '1.0')
from gi.repository import Gst
print(Gst._version)
print(Gst.version_string())
print(Gst.init.__doc__)
print([a.get_name() + ":" + str(a.is_optional()) for a in Gst.init.get_arguments()])

bianjp avatar Aug 13 '18 12:08 bianjp

1.0 Traceback (most recent call last): File "/home/leave8426/ACM/test.py", line 5, in print(Gst.version_string()) File "/usr/lib/python3.6/site-packages/gi/overrides/Gst.py", line 589, in fake_method raise NotInitialized("Please call Gst.init(argv) before using GStreamer") gi.overrides.Gst.NotInitialized: Please call Gst.init(argv) before using GStreamer

yatasun avatar Aug 13 '18 13:08 yatasun

看来 GObject 或 gstreamer 安装有问题。 什么发行版?什么版本?Python, GObject, gstream 都是怎么安装的?

bianjp avatar Aug 13 '18 15:08 bianjp

Manjaro 17.1.7 GNOME PyGoject : sudo pacman -S python-gobject python2-gobject gtk3 GStreamer : 作为另一个软件包的依赖而安装 Python 3.6.6.1 : 作为另一个软件包的依赖而安装

yatasun avatar Aug 13 '18 15:08 yatasun

我检查了下 Manjaro 的 python-gobject 包中并没有 /usr/lib/python3.6/site-packages/gi/overrides/Gst.py 这个文件。你看下这个文件是属于哪个包的:

pacman -Qo /usr/lib/python3.6/site-packages/gi/overrides/Gst.py

bianjp avatar Aug 13 '18 16:08 bianjp

/usr/lib/python3.6/site-packages/gi/overrides/Gst.py 由 gst-python 1.14.1-1 所拥有

yatasun avatar Aug 13 '18 16:08 yatasun

gst-python 由 GStreamer 官方团队维护,主页只是说 "overrides for the gobject-introspection-based pygst bindings" 却没说为什么要 override,也没说兼容性。

你可以暂时把 gst-python 卸载。我有空再好好考虑下是否有必要兼容 gst-python

bianjp avatar Aug 14 '18 01:08 bianjp

卸载后可以启动。THX

yatasun avatar Aug 14 '18 02:08 yatasun