Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyQt4.QtWebKit not available on Ubuntu 18.04 #155

Closed
jnweiger opened this issue Oct 1, 2019 · 1 comment
Closed

PyQt4.QtWebKit not available on Ubuntu 18.04 #155

jnweiger opened this issue Oct 1, 2019 · 1 comment

Comments

@jnweiger
Copy link

jnweiger commented Oct 1, 2019

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:

  • apt install python-pyside.qtwebkit
  • In flickcharm.py call import PySide.QtWebKit instead of the default PyQt4.QtWebKit.
@jnweiger
Copy link
Author

jnweiger commented Oct 1, 2019

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

@mgmax mgmax closed this as completed in 1ff83ec Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant