LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   xdot library is not able to open graphs in Ubuntu 14.04 (https://www.linuxquestions.org/questions/linux-newbie-8/xdot-library-is-not-able-to-open-graphs-in-ubuntu-14-04-a-4175504761/)

damanjit 05-12-2014 06:11 PM

xdot library is not able to open graphs in Ubuntu 14.04
 
I am using xdot utility to open graphs generated by graphviz on Ubuntu 14.04. But the problem is I am getting some python gtk related error as below:

My python version is 2.7.6
The same thing works on ubuntu 12.04 with python version 2.7.4

Quote:

$ xdot mpg.dot
/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/python2.7/dist-packages/xdot.py:1808: Warning: invalid (NULL) pointer instance
gtk.Window.__init__(self)
/usr/lib/python2.7/dist-packages/xdot.py:1808: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
gtk.Window.__init__(self)
/usr/lib/python2.7/dist-packages/xdot.py:1850: Warning: invalid (NULL) pointer instance
toolbar = uimanager.get_widget('/ToolBar')
/usr/lib/python2.7/dist-packages/xdot.py:1850: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
toolbar = uimanager.get_widget('/ToolBar')
/usr/lib/python2.7/dist-packages/xdot.py:1850: GtkWarning: IA__gdk_screen_get_display: assertion 'GDK_IS_SCREEN (screen)' failed
toolbar = uimanager.get_widget('/ToolBar')
/usr/lib/python2.7/dist-packages/xdot.py:1850: Warning: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
toolbar = uimanager.get_widget('/ToolBar')
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: IA__gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: IA__gtk_icon_size_lookup_for_settings: assertion 'GTK_IS_SETTINGS (settings)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: Invalid icon size 3

self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: IA__gtk_icon_theme_load_icon: assertion 'GTK_IS_ICON_THEME (icon_theme)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: Error loading theme icon 'document-open' for stock:
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: /build/buildd/gtk+2.0-2.24.23/gtk/gtkstyle.c:2358: invalid icon size '3'
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: IA__gtk_style_render_icon: assertion 'pixbuf != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: Warning: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_context_set_font_description: assertion 'context != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_context_set_base_dir: assertion 'context != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_context_set_language: assertion 'context != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_layout_new: assertion 'context != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_layout_set_text: assertion 'layout != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_layout_set_alignment: assertion 'layout != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_layout_set_width: assertion 'layout != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_layout_get_extents: assertion 'layout != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_context_get_language: assertion 'context != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_context_get_metrics: assertion 'PANGO_IS_CONTEXT (context)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: PangoWarning: pango_font_metrics_get_approximate_char_width: assertion 'metrics != NULL' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: Error loading theme icon 'view-refresh' for stock:
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: Error loading theme icon 'document-print' for stock:
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: Error loading theme icon 'zoom-in' for stock:
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: Error loading theme icon 'zoom-out' for stock:
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: Error loading theme icon 'zoom-fit-best' for stock:
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: Error loading theme icon 'zoom-original' for stock:
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: IA__gdk_screen_get_default_colormap: assertion 'GDK_IS_SCREEN (screen)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: IA__gdk_colormap_get_visual: assertion 'GDK_IS_COLORMAP (colormap)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed
self.show_all()
/usr/lib/python2.7/dist-packages/xdot.py:1857: GtkWarning: IA__gdk_window_new: assertion 'GDK_IS_WINDOW (parent)' failed
self.show_all()
Segmentation fault (core dumped)

sander24 05-20-2014 08:58 AM

Hi,
for me it also seems that upgrade to 14.04 broke something. I was able to use successfully on 13.10.

Quote:

john@john-laptop:~$ xdot
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/xdot.py", line 1910, in on_open
self.open_file(filename)
File "/usr/lib/python2.7/dist-packages/xdot.py", line 1881, in open_file
self.set_dotcode(fp.read(), filename)
File "/usr/lib/python2.7/dist-packages/xdot.py", line 1863, in set_dotcode
if self.widget.set_dotcode(dotcode, filename):
File "/usr/lib/python2.7/dist-packages/xdot.py", line 1477, in set_dotcode
self.set_xdotcode(xdotcode)
File "/usr/lib/python2.7/dist-packages/xdot.py", line 1497, in set_xdotcode
self.graph = parser.parse()
File "/usr/lib/python2.7/dist-packages/xdot.py", line 1167, in parse
DotParser.parse(self)
File "/usr/lib/python2.7/dist-packages/xdot.py", line 977, in parse
self.parse_graph()
File "/usr/lib/python2.7/dist-packages/xdot.py", line 986, in parse_graph
self.parse_stmt()
File "/usr/lib/python2.7/dist-packages/xdot.py", line 1032, in parse_stmt
self.handle_node(id, attrs)
File "/usr/lib/python2.7/dist-packages/xdot.py", line 1142, in handle_node
shapes.extend(parser.parse())
File "/usr/lib/python2.7/dist-packages/xdot.py", line 600, in parse
x, y = s.read_point()
File "/usr/lib/python2.7/dist-packages/xdot.py", line 500, in read_point
x = self.read_number()
File "/usr/lib/python2.7/dist-packages/xdot.py", line 494, in read_number
return int(self.read_code())
ValueError: invalid literal for int() with base 10: '18.5'

damanjit 05-20-2014 11:40 AM

Installing xdot 0.6 solved my problem.
http://stackoverflow.com/questions/2...ect=1#23631130


All times are GMT -5. The time now is 09:22 AM.