Python spynner and gtk3 issue

陌路散爱 提交于 2019-12-11 21:13:28

问题


I am always getting the following error on executing the script. I am trying to attach spynner window in a Gtk window. Is spynner will only works with gtk2??

import sys
import spynner
from BeautifulSoup import BeautifulSoup
from gi.repository import Gtk, Gdk
from gi.repository import GObject, GLib

class App:
  def __init__(self):
    self.browser = spynner.Browser()
    self.create_interior()
    self.window.show_all()

  def create_interior(self):    
    self.window = Gtk.Window()
    self.window.set_border_width(0)
    self.mainvbox = Gtk.VBox(False, 0)
    self.mainvbox.pack_start(self.browser,False, False, 2)

if __name__ == "__main__":
    app = App()
    Gtk.main()

Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped)

来源:https://stackoverflow.com/questions/24079615/python-spynner-and-gtk3-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!