Стамбул накрыть странную ошибку
Попытка запустить покрытие Стамбул, но получить следующий набор ошибок и, похоже, не может их исправить. Это простой тест покрытия кода. Фактическая команда:
istanbul cover --dir ../artifacts --report html -- ./node_modules/mocha/bin/_mocha tests/unit/* --recursive --reporter spec
Мои ошибки, как показано ниже:
(istanbul:10869): GConf-WARNING **: Client failed to connect to the D- BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Traceback (most recent call last):
File "/usr/bin/istanbul", line 24, in <module>
from istanbul.main import main
File "/usr/lib/pymodules/python2.7/istanbul/main/main.py", line 37, in <module>
from istanbul.main.tray_icon import TrayIcon
File "/usr/lib/pymodules/python2.7/istanbul/main/tray_icon.py", line 30, in <module>
class TrayIcon:
File "/usr/lib/pymodules/python2.7/istanbul/main/tray_icon.py", line 34, in TrayIcon
popup_menu = TrayPopupMenu()
File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 38, in __init__
self._setup_popup_menu()
File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 47, in _setup_popup_menu
self._setup_record_3d()
File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 102, in _setup_record_3d
new_widget = Widget(record_3d)
File "/usr/lib/pymodules/python2.7/istanbul/main/constants.py", line 36, in __init__
self.associate_preference()
File "/usr/lib/pymodules/python2.7/istanbul/main/constants.py", line 39, in associate_preference
preferences = Preferences()
File "/usr/lib/pymodules/python2.7/istanbul/main/preferences.py", line 134, in __init__
new_pref = Preference(setting, setting_v[0], setting_v[1], setting_v[2])
File "/usr/lib/pymodules/python2.7/istanbul/main/preferences.py", line 38, in __init__
self.gconf = IstanbulGConf()
File "/usr/lib/pymodules/python2.7/istanbul/main/gconf_client.py", line 78, in __init__
GConfClient.__init__(self, '/apps/istanbul')
File "/usr/lib/pymodules/python2.7/istanbul/main/gconf_client.py", line 27, in __init__
self.client.add_dir (directory, gconf.CLIENT_PRELOAD_NONE)
glib.GError: No D-BUS daemon running
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:37: Warning: invalid (NULL) pointer instance
self.tooltips = gtk.Tooltips()
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:37: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
self.tooltips = gtk.Tooltips()
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:43: Warning: invalid (NULL) pointer instance
self.popupmenu = gtk.Menu()
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:43: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
self.popupmenu = gtk.Menu()
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:54: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
self.popupmenu_aboutitem = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:54: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
self.popupmenu_aboutitem = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:54: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
self.popupmenu_aboutitem = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:73: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
_("_Select Area to Record"))
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:73: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
_("_Select Area to Record"))
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:73: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
_("_Select Area to Record"))
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:86: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
_("Select _Window to Record"))
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:86: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
_("Select _Window to Record"))
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:86: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
_("Select _Window to Record"))
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:98: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
record_3d = gtk.CheckMenuItem(_("Record _3D"))
/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py:98: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
record_3d = gtk.CheckMenuItem(_("Record _3D"))
(istanbul:10897): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Traceback (most recent call last):
File "/usr/bin/istanbul", line 24, in <module>
from istanbul.main import main
File "/usr/lib/pymodules/python2.7/istanbul/main/main.py", line 37, in <module>
from istanbul.main.tray_icon import TrayIcon
File "/usr/lib/pymodules/python2.7/istanbul/main/tray_icon.py", line 30, in <module>
class TrayIcon:
File "/usr/lib/pymodules/python2.7/istanbul/main/tray_icon.py", line 34, in TrayIcon
popup_menu = TrayPopupMenu()
File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 38, in __init__
self._setup_popup_menu()
File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 47, in _setup_popup_menu
self._setup_record_3d()
File "/usr/lib/pymodules/python2.7/istanbul/main/tray_popup.py", line 102, in _setup_record_3d
new_widget = Widget(record_3d)
File "/usr/lib/pymodules/python2.7/istanbul/main/constants.py", line 36, in __init__
self.associate_preference()
File "/usr/lib/pymodules/python2.7/istanbul/main/constants.py", line 39, in associate_preference
preferences = Preferences()
File "/usr/lib/pymodules/python2.7/istanbul/main/preferences.py", line 134, in __init__
new_pref = Preference(setting, setting_v[0], setting_v[1], setting_v[2])
File "/usr/lib/pymodules/python2.7/istanbul/main/preferences.py", line 38, in __init__
self.gconf = IstanbulGConf()
File "/usr/lib/pymodules/python2.7/istanbul/main/gconf_client.py", line 78, in __init__
GConfClient.__init__(self, '/apps/istanbul')
File "/usr/lib/pymodules/python2.7/istanbul/main/gconf_client.py", line 27, in __init__
self.client.add_dir (directory, gconf.CLIENT_PRELOAD_NONE)
glib.GError: No D-BUS daemon running
1 ответ
Если приложение основано на графическом интерфейсе и если вы уже подключили дисплей, приложение не может открыть дисплей, попробуйте это...
Вам необходимо экспортировать его адрес. как правило, это будет 0.0 Так что ваша команда будет выглядеть как "export DISPLAY=:0.0", если не сработает, попробуйте изменить 0.0 на 0, тогда она сможет найти экран.