reading:Â N:\leo\workbook.leo
read 3 files in 0.02 seconds
read outline in 0.06 seconds
hook failed: idle, <bound method ViewRenderedController3.update of <leo.plugins.viewrendered3.ViewRenderedController3 object at 0x000000000C2D59D8>>, <no module>
Traceback (most recent call last):
  File "N:\git\leo-editor\leo\core\leoPlugins.py", line 328, in callTagHandler
    result = handler(tag, keywords)
  File "N:\git\leo-editor\leo\plugins\viewrendered3.py", line 695, in update
    f(s, keywords)
  File "N:\git\leo-editor\leo\plugins\viewrendered3.py", line 1120, in update_url
    self.update_rst(s, keywords)
  File "N:\git\leo-editor\leo\plugins\viewrendered3.py", line 1007, in update_rst
    w = pc.html_class(pc)
  File "N:\git\leo-editor\leo\plugins\viewrendered3.py", line 1292, in __init__
    self.view = self.init_view()
  File "N:\git\leo-editor\leo\plugins\viewrendered3.py", line 1299, in init_view
    view = QtWebKitWidgets.QWebView()
AttributeError: 'NoneType' object has no attribute 'QWebView'
Lewis
PyQt5
Python package.' and QtWebkitWidgets is included in the list.The PyQt5 docs http://pyqt.sourceforge.net/Docs/PyQt5/introduction.html# Â state 'PyQt5 comprises a number of different components. First of all there are a number of Python extension modules. These are all installed in thePyQt5
Python package.' and​​​​QtWebkitWidgets is included in the list.
Here is the result of runningimport PyQt5.QtWebKitWidgets as QtWebKitWidgetsexception executing scriptTraceback (most recent call last): File "N:\git\leo-editor\leo\core\leoCommands.py", line 1700, in executeScript  c.executeScriptHelper(args, define_g, define_name, namespace, script) File "N:\git\leo-editor\leo\core\leoCommands.py", line 1735, in executeScriptHelper  exec(compile(script, scriptFile, 'exec'), d) File "C:\Users\lewis\.leo\scriptFile.py", line 3, in <module>  import PyQt5.QtWebKitWidgets as QtWebKitWidgetsImportError: No module named '​​PyQt5.QtWebKitWidgets'
date: Mon Apr 25 09:33:33 2016 +0100Â
anyone know what's happening about this issue? i just installed leo from git and have python 3.5.2 and pyqt 5.6 on this system, so the rendered view does not work for me at all because of this. :(
yes. i'm aware of what causes the issue. what i want to know is what's
happening with it being resolved?
the renderer needs to be fixed to support QtWebEngine, as john lunzer
points out above, so that it will work on pyqt 5.6 and above.
does anyone know if this is being fixed?
--
You received this message because you are subscribed to a topic in the Google Groups "leo-editor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/leo-editor/J_wVIzqQzXg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to leo-editor+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.
yes, this would work if the interface to and behaviour of QtWebEngineWidgets and QtWebKitWidgets is identical, but i don't know.
On 13/7/16 8:20 PM, rengel wrote:
yes. i'm aware of what causes the issue. what i want to know is what's
happening with it being resolved?
the renderer needs to be fixed to support QtWebEngine, as john lunzer
points out above, so that it will work on pyqt 5.6 and above.
does anyone know if this is being fixed?
Well, I don't know, if it this is being fixed, but I know, how this can be fixed:In leoQt.py outcomment and insert the following lines:
 ...  try:    # from PyQt5 import QtWebKit    from PyQt5 import QtWebEngineCore as QtWebKit  except ImportError:    QtWebKit = None  try:    #import PyQt5.QtWebKitWidgets as QtWebKitWidgets    import PyQt5.QtWebEngineWidgets as QtWebKitWidgets    QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView  except ImportError:    QtWebKitWidgets = None...
At least, this allows me to show the viewrendered pane. If there are other implications, I don't know.
[...snip...]
I have not tested this in detail, and certainly not with pyqt 5.6. Please report any problems.
Edward
Rev 582fe79 attempts a fix. The only significant change is the following:​   try:
       from PyQt5 import QtWebKit
   except ImportError:
       # 2016/07/13: Reinhard: Support pyqt 5.6...
       try:
           from PyQt5 import QtWebEngineCore as QtWebKit
       except ImportError:
           QtWebKit = None
   try:
       import PyQt5.QtWebKitWidgets as QtWebKitWidgets
   except ImportError:
       try:
           # 2016/07/13: Reinhard: Support pyqt 5.6...
           import PyQt5.QtWebEngineWidgets as QtWebKitWidgets
           QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView
       except ImportError:
           QtWebKitWidgets = None​
import PyQt5.QtWebEngineCore as QtWebKit
import PyQt5.QtWebEngineWidgets as QtWebKitWidgets
g.es(QtWebKit)
g.es(QtWebKitWidgets)
# used by all
QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView
g.es(QtWebKitWidgets.QWebView)
# used by richtext.py
QtWebKit.QWebSettings = QtWebKitWidgets.QWebEngineSettings
g.es(QtWebKit.QWebSettings)
# used by viewrendered(2|3).py, bigdash.py
QtWebKitWidgets.QWebPage = QtWebKitWidgets.QWebEnginePage
g.es(QtWebKitWidgets.QWebPage)
# used by viewrendered(2|3).py
QtWebKitWidgets.QWebSettings = QtWebKitWidgets.QWebEngineSettings
g.es(QtWebKitWidgets.QWebSettings)