伊斯坦布尔封面抛出奇怪的错误

时间:2015-08-21 16:08:33

标签: node.js istanbul

尝试运行伊斯坦布尔封面但遇到以下错误并且似乎无法修复它们。这是一个简单的代码覆盖测试。 实际命令是:

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)

如果应用程序是基于GUI的,如果你已经有附加的显示仍然应用程序无法打开显示试试这个......

您需要导出其地址。通常它将是0.0所以你的命令将像“export DISPLAY =:0.0”如果不起作用尝试将0.0更改为0然后它可以找到显示。