Python spynner and gtk3 issue

2019-09-14 06:16发布

问题:

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)