由于 gtk_init 错误,gnuradio-companion 无法运行

由于 gtk_init 错误,gnuradio-companion 无法运行

我的问题非常类似这个问题但是我在 Windows 机器上的 Ubuntu 本地上运行 gnuradio,而不是 docker。当我输入命令时gnuradio-companion &,我收到以下错误

Gtk init_check failed. GRC might not be able to start a GUI.
Traceback (most recent call last):
  File "/usr/bin/gnuradio-companion", line 103, in <module>
    run_main()
  File "/usr/bin/gnuradio-companion", line 96, in run_main
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/gnuradio/grc/main.py", line 73, in main
    from .gui.Platform import Platform
  File "/usr/lib/python3/dist-packages/gnuradio/grc/gui/Platform.py", line 14, in <module>
    from . import canvas
  File "/usr/lib/python3/dist-packages/gnuradio/grc/gui/canvas/__init__.py", line 10, in <module>
    from .param import Param
  File "/usr/lib/python3/dist-packages/gnuradio/grc/gui/canvas/param.py", line 11, in <module>
    from .. import ParamWidgets, Utils, Constants, Actions
  File "/usr/lib/python3/dist-packages/gnuradio/grc/gui/ParamWidgets.py", line 61, in <module>
    add_style_provider()
  File "/usr/lib/python3/dist-packages/gnuradio/grc/gui/ParamWidgets.py", line 54, in add_style_provider
    Gtk.StyleContext.add_provider_for_screen(
TypeError: Argument 0 does not allow None as a value

[1]+  Exit 1                  sudo gnuradio-companion

我发现了另一个类似的问题(与 gtk_init 问题有关),它建议修改 gnuradio-companion 文件,以绕过错误消息和无法打开图形应用程序,但是我宁愿不绕过问题,也不愿修复它。我对 Ubuntu 和 gnuradio 还很陌生,所以任何帮助我都会很感激。

相关内容