Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

QtWebkit need #25

Open
hayg25 opened this issue Apr 25, 2019 · 11 comments
Open

QtWebkit need #25

hayg25 opened this issue Apr 25, 2019 · 11 comments

Comments

@hayg25
Copy link

hayg25 commented Apr 25, 2019

Dear all,
trying to install, I got an issue concerning QtWebkit :

MainThread     INFO     2019-04-25 10:49:27,170 TaurusRootLogger: Using PyQt4 (v4.12.1 , with Qt 4.8.7)
MainThread     INFO     2019-04-25 10:49:27,200 taurus.qt.qtgui.icon.icon: Setting Tango icon theme (from /usr/local/lib/python2.7/dist-packages/taurus/qt/qtgui/icon/)
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/guler/TANGO/MaXIV/lib-maxiv-svgsynoptic/examples/simple/__main__.py", line 12, in <module>
    from svgsynoptic2.synopticwidget import SynopticWidget
  File "/home/guler/.local/lib/python2.7/site-packages/svgsynoptic2/__init__.py", line 1, in <module>
    from svgsynoptic2.synopticwidget import SynopticWidget
  File "/home/guler/.local/lib/python2.7/site-packages/svgsynoptic2/synopticwidget.py", line 12, in <module>
    from PyQt4.QtWebKit import QWebPage, QWebView, QWebSettings, QWebInspector
ImportError: No module named QtWebKit

thx for the feedback and installation tips
Hayg

@dschick
Copy link

dschick commented Feb 20, 2020

Hi,

same for me though.

QtWebkit seems to be hard to get for PyQt4.
I tried to change al imports from PyQt4 to PyQt5 and were able to install without errors.
However, when trying the simple example the taurus imports do import again PyQt4 and this crashes the example due to the imports of both versions.
Also the QtWebkit seems to differ from PyQt4 to PyQt5, at least the sub-modules seem to be different.

@dschick
Copy link

dschick commented Feb 21, 2020

moreover, this packges seems to be python2.
Are there any efforts to directly move to python3?

Is there maybe a demo available?
I would really like to test it!

@hayg25
Copy link
Author

hayg25 commented Feb 26, 2020

Dear @dschick,
I used conda to install all the needed packages under ubuntu18 / debian9 but I had the following issue:

Fontconfig warning: ignoring C.UTF-8: not a valid language tag
init TaurusSynopticWidget
/home/guler/TANGO/Repository/MaxIV/lib-maxiv-svgsynoptic/examples/tango_ooo/example.html
var modelNames ={value3 : "sys/tg_test/2/ampli",value2 : "sys/tg_test/1/ampli",value1 : "sys/tg_test/1/double_scalar",};
absolute path /home/guler/TANGO/Repository/MaxIV/lib-maxiv-svgsynoptic/examples/tango_ooo//home/guler/TANGO/Repository/MaxIV/lib-maxiv-svgsynoptic/examples/tango_ooo/example.html
placeholder found
set_url /home/guler/TANGO/Repository/MaxIV/lib-maxiv-svgsynoptic/examples/tango_ooo/example.html
JsConsole(file:///home/guler/anaconda3/envs/taurus_sardana2/lib/python2.7/site-packages/svgsynoptic2/web/js/main.js:68):
load /home/guler/TANGO/Repository/MaxIV/lib-maxiv-svgsynoptic/examples/tango_ooo/example.svg
JsConsole(file:///home/guler/anaconda3/envs/taurus_sardana2/lib/python2.7/site-packages/svgsynoptic2/web/js/main.js:68):
/home/guler/anaconda3/envs/taurus_sardana2/lib/python2.7/site-packages/svgsynoptic2/web/
JsConsole(:1):
XMLHttpRequest cannot load file:///home/guler/TANGO/Repository/MaxIV/lib-maxiv-svgsynoptic/examples/tango_ooo/example.svg. Cross origin requests are only supported for HTTP.
JsConsole(undefined:0):
TypeError: 'null' is not an object
JsConsole(undefined:0):
NETWORK_ERR: XMLHttpRequest Exception 101: A network error occured in synchronous requests.  

it seems that the code should be updated at some point.
may be @AntoineDupre have you a way to solve those problems ?

Thx

@dschick
Copy link

dschick commented Feb 26, 2020

hi @hayg25 , thanks for your help.
I actually wanted to avoid using conda, since I am using pip in my installation.
But I fear that conda might be the only way to get PyQT.Qtwebkit running on Ubuntu.

So having an updated version of the code is highly appriciated.

@dschick
Copy link

dschick commented Sep 16, 2020

maybe one can have a look at #32

@wkitka
Copy link
Member

wkitka commented Sep 16, 2020

Hej @hayg25 and @dschick,
You may want to check #31
It worked fine in my local test environment with Python 3.6, Taurus 4.7 and PyQt 5.15.
You should be able to install all the dependencies from pip.

@hayg25
Copy link
Author

hayg25 commented Sep 17, 2020

dear @wkitka ,
that's a really good news ! I will check asap. Is it on the developp branch ?

Cheers

@wkitka
Copy link
Member

wkitka commented Sep 17, 2020

Hej @hayg25,

it's not yet merged into develop branch. You can find code here: https://github.com/wkitka/lib-maxiv-svgsynoptic/tree/python3

@hayg25
Copy link
Author

hayg25 commented Oct 20, 2020

Hi @wkitka,
so I have few issues to install the module, but nothing serious.
But, I had problem when I tried to run it :

MainThread     INFO     2020-10-20 19:18:24,184 TaurusRootLogger: Using PyQt5 (v5.12.3 with Qt 5.12.5 and Python 3.8.6)
MainThread     INFO     2020-10-20 19:18:24,606 TaurusRootLogger: Plugin "taurus_pyqtgraph" lazy-loaded as "taurus.qt.qtgui.tpg"
MainThread     WARNING  2020-10-20 19:18:27,621 TaurusRootLogger: Qtdefault None.None[0]: WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
MainThread     CRITICAL 2020-10-20 19:18:28,611 TaurusRootLogger: Qtdefault None.None[0]: Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
Aborted

any idea ?
btw I run it under python 3.8.6 with pyqt5.12

@hayg25
Copy link
Author

hayg25 commented Oct 20, 2020

Hi again,
first issue was related to the config file :

# I commented the line below and installation works fine
#release = 1%{?dist}.maxlab

@hayg25
Copy link
Author

hayg25 commented Oct 23, 2020

Hi @wkitka ,
just an answer about my last attempt : it did not work through ssh, but works fine if I do it directly on the server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants