Python / 尝试在 Debian 9 中使用 pyperclip.copy() 时出现 GTK 错误
Python / GTK error when trying to use pyperclip.copy() in Debian 9
我完全是编程新手,我用不同的方式搜索了 google 中的波纹管错误,但没有找到合理的结果。
我的代码基本上是在尝试:
pyperclip.copy(str(DICTIONARY[KEY]))
我在命令行中调用程序是:
python3 ./PasswordManager.py blog
其中"blog"就是上述函数的"key"。
这些是我收到的错误:
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:186:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2749:24: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2749:24: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2940:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2940:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2946:17: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:4083:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:4083:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:4088:17: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:4729:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:4729:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: xfce.css:47:16: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: xfce.css:47:16: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:16:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:16:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:26:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:26:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:40:16: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:40:16: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:96:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:100:16: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:100:16: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:279:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:279:14: Expected a string.
完全解决
sudo apt-get install xclip xsel
来源:Pyperclip is giving an error
我完全是编程新手,我用不同的方式搜索了 google 中的波纹管错误,但没有找到合理的结果。
我的代码基本上是在尝试:
pyperclip.copy(str(DICTIONARY[KEY]))
我在命令行中调用程序是:
python3 ./PasswordManager.py blog
其中"blog"就是上述函数的"key"。
这些是我收到的错误:
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:186:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2749:24: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2749:24: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2940:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2940:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2946:17: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:4083:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:4083:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:4088:17: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:4729:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:4729:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: xfce.css:47:16: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: xfce.css:47:16: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:16:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:16:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:26:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:26:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:40:16: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:40:16: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:96:14: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:100:16: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:100:16: Expected a string.
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:279:14: not a number
(python3:26893): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:279:14: Expected a string.
完全解决
sudo apt-get install xclip xsel
来源:Pyperclip is giving an error