fau-fablab / FabLabKasse

FabLabKasse, a Point-of-Sale Software for FabLabs and other public and trust-based workshops
https://fablabkasse.readthedocs.io
GNU General Public License v3.0
15 stars 4 forks source link

PyQt4.QtWebKit not available on Ubuntu 18.04 #155

Closed jnweiger closed 4 years ago

jnweiger commented 4 years ago

The installation documentation says nothing about getting webkit python bindings. But they are mandatory. On Ubuntu 18.04, when starting with run.py we get this error:

starting GUI
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/testy/src/github/fau-fablab/FabLabKasse/FabLabKasse/gui.py", line 46, in <module>
    from libs.flickcharm import FlickCharm
  File "/home/testy/src/github/fau-fablab/FabLabKasse/FabLabKasse/libs/flickcharm/__init__.py", line 1, in <module>
    from flickcharm import *
  File "/home/testy/src/github/fau-fablab/FabLabKasse/FabLabKasse/libs/flickcharm/flickcharm.py", line 5, in <module>
    from PyQt4.QtWebKit import *
ImportError: No module named QtWebKit
GUI exited

Suggested workaround:

jnweiger commented 4 years ago

Or upgrade to flickcharm master, which solves it by falling back to QWebView:

try:
    from PyQt4.QtWebKit import *
except ImportError:
    # QtWebKit is not available, fall-back gently
    class QWebView(object):
        pass