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

Using ctrl-c to copy from the output gives an error #26

Open
heuristicus opened this issue May 4, 2021 · 1 comment
Open

Using ctrl-c to copy from the output gives an error #26

heuristicus opened this issue May 4, 2021 · 1 comment
Assignees

Comments

@heuristicus
Copy link

Traceback (most recent call last):
  File "/home/michal/robots/drs/catkin_ws/src/procman_ros/python/src/procman_ros/sheriff_gtk/command_console.py", line 266, in on_key_release
    self._tb_copy_selection()
  File "/home/michal/robots/drs/catkin_ws/src/procman_ros/python/src/procman_ros/sheriff_gtk/command_console.py", line 257, in _tb_copy_selection
    clipboard.set_text(text)
TypeError: Gtk.Clipboard.set_text() takes exactly 3 arguments (2 given)
@heuristicus heuristicus self-assigned this May 4, 2021
@heuristicus
Copy link
Author

heuristicus commented May 25, 2021

Changing the error line to

clipboard.set_text(text, -1)

-1 is supposed to make the function calculate the text length itself.

Results in more spam:

/home/michal/robots/drs/catkin_ws/src/procman_ros/python/src/procman_ros/sheriff_gtk/command_console.py:257: Warning: g_object_get_data: assertion 'G_IS_OBJECT (object)' failed
  clipboard.set_text(text, -1)

(sheriff:42423): Gdk-CRITICAL **: 15:29:20.537: gdk_display_get_default_screen: assertion 'GDK_IS_DISPLAY (display)' failed

(sheriff:42423): Gtk-CRITICAL **: 15:29:20.537: gtk_invisible_new_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
/home/michal/robots/drs/catkin_ws/src/procman_ros/python/src/procman_ros/sheriff_gtk/command_console.py:257: Warning: invalid (NULL) pointer instance
  clipboard.set_text(text, -1)
/home/michal/robots/drs/catkin_ws/src/procman_ros/python/src/procman_ros/sheriff_gtk/command_console.py:257: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
  clipboard.set_text(text, -1)

(sheriff:42423): Gtk-CRITICAL **: 15:29:20.537: gtk_widget_add_events: assertion 'GTK_IS_WIDGET (widget)' failed
/home/michal/robots/drs/catkin_ws/src/procman_ros/python/src/procman_ros/sheriff_gtk/command_console.py:257: Warning: g_object_set_data: assertion 'G_IS_OBJECT (object)' failed
  clipboard.set_text(text, -1)

(sheriff:42423): Gdk-CRITICAL **: 15:29:20.537: gdk_display_get_default_screen: assertion 'GDK_IS_DISPLAY (display)' failed

(sheriff:42423): Gtk-CRITICAL **: 15:29:20.537: gtk_invisible_new_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(sheriff:42423): Gtk-CRITICAL **: 15:29:20.537: gtk_widget_add_events: assertion 'GTK_IS_WIDGET (widget)' failed

(sheriff:42423): Gtk-CRITICAL **: 15:29:20.537: gtk_selection_owner_set_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(sheriff:42423): Gdk-CRITICAL **: 15:29:20.537: gdk_display_supports_clipboard_persistence: assertion 'GDK_IS_DISPLAY (display)' failed

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

1 participant