akshaykmr/hogwatch

Missing installation dependency for Linux

pmontrasio opened this issue · 2 comments

This is needed to be able to run on Linux (Ubuntu 16.04)

sudo apt install gir1.2-webkit-3.0

or it will fail with

/home/me/.local/lib/python2.7/site-packages/application/server/static/
WARNING:webview.qt:PyQt4 is not found
WARNING:webview.qt:PyQt5 is not found
WARNING:webview:QT not found
/home/me/.local/lib/python2.7/site-packages/webview/gtk.py:15: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk as gtk
WARNING:webview.gtk:PyGObject is not found
Traceback (most recent call last):
  File "/home/me/.local/lib/python2.7/site-packages/webview/gtk.py", line 17, in <module>
    from gi.repository import WebKit as webkit
ImportError: cannot import name WebKit
Traceback (most recent call last):
  File "/home/me/.local/bin/hogwatch", line 24, in <module>
    window('hogwatch','http://127.0.0.1:6432/index.html')
  File "/home/me/.local/lib/python2.7/site-packages/application/view/window.py", line 5, in window
    webview.create_window(title,location, resizable=True,width=480,height=720);
  File "/home/me/.local/lib/python2.7/site-packages/webview/__init__.py", line 94, in create_window
    gui.create_window(_make_unicode(title), _transform_url(url), width, height, resizable, fullscreen, min_size)
  File "/home/me/.local/lib/python2.7/site-packages/webview/gtk.py", line 116, in create_window
    browser = BrowserView(title, url, width, height, resizable, fullscreen, min_size)
  File "/home/me/.local/lib/python2.7/site-packages/webview/gtk.py", line 51, in __init__
    webview = webkit.WebView()
NameError: global name 'webkit' is not defined

You might want to add that to the README. I also installed sudo apt install python-webkit but I'm not sure it's needed.

I needed python-gi as well, in a clean Xubuntu 16.04 VM. It still had other issues though, while open in windowed mode (icons/graphics were not displayed) so I ended up just using it from the browser.

Thanks. I have linked this issue in the readme and will report it to pywebview's maintainer.