Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

启动失败 #5

Open
yatasun opened this issue Aug 13, 2018 · 10 comments
Open

启动失败 #5

yatasun opened this issue Aug 13, 2018 · 10 comments

Comments

@yatasun
Copy link

yatasun commented Aug 13, 2018

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'

@bianjp
Copy link
Owner

bianjp commented Aug 13, 2018

gstreamer 版本号是多少?

@yatasun
Copy link
Author

yatasun commented Aug 13, 2018

1.14.2-1

@bianjp
Copy link
Owner

bianjp commented Aug 13, 2018

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

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()])

@yatasun
Copy link
Author

yatasun commented Aug 13, 2018

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

@bianjp
Copy link
Owner

bianjp commented Aug 13, 2018

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

@yatasun
Copy link
Author

yatasun commented Aug 13, 2018

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

@bianjp
Copy link
Owner

bianjp commented Aug 13, 2018

我检查了下 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

@yatasun
Copy link
Author

yatasun commented Aug 13, 2018

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

@bianjp
Copy link
Owner

bianjp commented Aug 14, 2018

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

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

@yatasun
Copy link
Author

yatasun commented Aug 14, 2018

卸载后可以启动。THX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants