Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. PyQt5 html not displaying?
Forum Updated to NodeBB v4.3 + New Features

PyQt5 html not displaying?

Scheduled Pinned Locked Moved Unsolved Qt for Python
6 Posts 4 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    horsefeathers
    wrote on 20 Sept 2021, 15:25 last edited by
    #1

    I feel like this should be straightforward to sort out, but I'm having trouble after a bunch of testing and Googling.

    I'm trying to render some plotly plots via a simply PyQt application. On some machines (three so far), it all works. On other machines (two so far), it's completely blank. All of them are running Windows, all python 3.9. All also (from pip list):

    • PyQt5 5.15.4
      PyQt5-Qt5 5.15.2
      PyQt5-sip 12.9.0
      pyqtgraph 0.12.1
      PyQtWebEngine 5.15.4
      PyQtWebEngine-Qt5 5.15.2

    I think the problem is around QWebEngine (probably some configuration, some path variable to do with it) but I'm not sure. Other Qt assets (push buttons, combo boxes, etc. etc.) work great.

    Here are two readily available scripts that I've tested, with screenshots.

    https://www.linuxquestions.org/questions/programming-9/pyqt5-and-qtwebengine-4175695802/ is a full-on web browser. On some machines, it works as a browser. On some, it's blank aside from the toolbar and navigation bar. Compare not working and working.

    Another script I'm using to debug is here, a plotly plot: https://github.com/plotly/plotly.py/issues/716#issuecomment-423748497. Compare not working and working.

    Any hints on what the issue might be? Any other info that I can give that might be helpful?

    Thanks in advance.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 20 Sept 2021, 18:25 last edited by
      #2

      Hi and welcome to devnet,

      One thing you can do is start your script with the QT_DEBUG_PLUGINS environment variable set to 1.

      That will give information about the various plugins loaded.

      Since it might be using WebGL, did you compare the graphics card and drivers for the machines ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • H Offline
        H Offline
        horsefeathers
        wrote on 21 Sept 2021, 15:43 last edited by horsefeathers
        #3

        Thanks for the response. I'm working on getting a hold of the difference between the machines' graphics drivers.

        I've added the following to the second example (the plotly plot):

        os.environ['QT_DEBUG_PLUGINS']='1'
        os.environ["QTWEBENGINE_CHROMIUM_FLAGS"] = "--enable-gpu-command-logging"
        

        Qt Debug doesn't seem to give me anything interesting, but I do get the following:

        [33276:29816:0921/102811.379:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetBucketSize
        [33276:29816:0921/102811.379:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetBucketData
        [33276:29816:0921/102811.379:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetToken
        [33276:29816:0921/102811.379:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetBucketSize
        [33276:29816:0921/102811.380:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetBucketData
        [33276:29816:0921/102811.380:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetToken
        [33276:29816:0921/102811.380:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: kTraceBeginCHROMIUM
        [33276:29816:0921/102811.380:ERROR:gles2_cmd_decoder.cc(5927)] [.BrowserMainThread-000001E16F86AB50]cmd: SetBucketSize[33276:29816:0921/102811.380:ERROR:gles2_cmd_decoder.cc(5927)] [.BrowserMainThread-000001E16F86AB50]cmd: SetBucketSize[33276:29816:0921/102811.381:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetBucketSize
        [33276:29816:0921/102811.381:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetBucketData
        [33276:29816:0921/102811.381:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetToken
        [33276:29816:0921/102811.381:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetBucketSize
        [33276:29816:0921/102811.382:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetBucketData
        [33276:29816:0921/102811.382:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetToken
        [33276:29816:0921/102811.382:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: kTraceBeginCHROMIUM
        [33276:29816:0921/102811.382:ERROR:raster_decoder.cc(1210)] [.BrowserWorker-000001E16F869E50]cmd: SetBucketSize
        [33276:29816:0921/102811.382:ERROR:raster_decoder.cc(1210)] [.BrowserWorker-000001E16F869E50]cmd: SetBucketSize
        [33276:29816:0921/102811.382:ERROR:gles2_cmd_decoder.cc(5927)] [.BrowserMainThread-000001E16F86AB50]cmd: kFlushDriverCachesCHROMIUM
        [33276:29816:0921/102811.383:ERROR:gles2_cmd_decoder.cc(5927)] [.BrowserMainThread-000001E16F86AB50]cmd: kFlush
        [33276:29816:0921/102811.383:ERROR:raster_decoder.cc(1210)] [.BrowserWorker-000001E16F869E50]cmd: kFlush
        [...]

        Does that mean anything to you guys?

        J 1 Reply Last reply 21 Sept 2021, 17:26
        0
        • H horsefeathers
          21 Sept 2021, 15:43

          Thanks for the response. I'm working on getting a hold of the difference between the machines' graphics drivers.

          I've added the following to the second example (the plotly plot):

          os.environ['QT_DEBUG_PLUGINS']='1'
          os.environ["QTWEBENGINE_CHROMIUM_FLAGS"] = "--enable-gpu-command-logging"
          

          Qt Debug doesn't seem to give me anything interesting, but I do get the following:

          [33276:29816:0921/102811.379:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetBucketSize
          [33276:29816:0921/102811.379:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetBucketData
          [33276:29816:0921/102811.379:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetToken
          [33276:29816:0921/102811.379:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetBucketSize
          [33276:29816:0921/102811.380:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetBucketData
          [33276:29816:0921/102811.380:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: SetToken
          [33276:29816:0921/102811.380:ERROR:gles2_cmd_decoder.cc(5927)] [GroupMarkerNotSet(crbug.com/242999)!:48EB9F6FE1010000]cmd: kTraceBeginCHROMIUM
          [33276:29816:0921/102811.380:ERROR:gles2_cmd_decoder.cc(5927)] [.BrowserMainThread-000001E16F86AB50]cmd: SetBucketSize[33276:29816:0921/102811.380:ERROR:gles2_cmd_decoder.cc(5927)] [.BrowserMainThread-000001E16F86AB50]cmd: SetBucketSize[33276:29816:0921/102811.381:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetBucketSize
          [33276:29816:0921/102811.381:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetBucketData
          [33276:29816:0921/102811.381:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetToken
          [33276:29816:0921/102811.381:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetBucketSize
          [33276:29816:0921/102811.382:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetBucketData
          [33276:29816:0921/102811.382:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: SetToken
          [33276:29816:0921/102811.382:ERROR:raster_decoder.cc(1210)] [GroupMarkerNotSet(crbug.com/242999)!:68A1506FE1010000]cmd: kTraceBeginCHROMIUM
          [33276:29816:0921/102811.382:ERROR:raster_decoder.cc(1210)] [.BrowserWorker-000001E16F869E50]cmd: SetBucketSize
          [33276:29816:0921/102811.382:ERROR:raster_decoder.cc(1210)] [.BrowserWorker-000001E16F869E50]cmd: SetBucketSize
          [33276:29816:0921/102811.382:ERROR:gles2_cmd_decoder.cc(5927)] [.BrowserMainThread-000001E16F86AB50]cmd: kFlushDriverCachesCHROMIUM
          [33276:29816:0921/102811.383:ERROR:gles2_cmd_decoder.cc(5927)] [.BrowserMainThread-000001E16F86AB50]cmd: kFlush
          [33276:29816:0921/102811.383:ERROR:raster_decoder.cc(1210)] [.BrowserWorker-000001E16F869E50]cmd: kFlush
          [...]

          Does that mean anything to you guys?

          J Offline
          J Offline
          JonB
          wrote on 21 Sept 2021, 17:26 last edited by JonB
          #4

          @horsefeathers said in PyQt5 html not displaying?:

          os.environ['QT_DEBUG_PLUGINS']='1'
          os.environ["QTWEBENGINE_CHROMIUM_FLAGS"] = "--enable-gpu-command-logging"
          

          Qt Debug doesn't seem to give me anything interesting

          If you are setting the QT_DEBUG_PLUGINS environment variable within the PyQt5 script you are wanting to examine, that is too late. It needs to be set externally for Qt start-up. Inside a script it might depend exactly where you do it, maybe before QApplication is good enough, I'm not sure. It should cause some diagnostic output on stdout/err. I don't about the QTWEBENGINE_CHROMIUM_FLAGS.

          1 Reply Last reply
          2
          • H Offline
            H Offline
            horsefeathers
            wrote on 29 Sept 2021, 18:52 last edited by
            #5

            @JonB @SGaist the above unfortunately doesn't seem to make a difference in my situation. I believe both QT_DEBUG_PLUGINS and QTWEBENGINE_CHROMIUM_FLAGS are working as intended.

            Some maybe relative tidbits from DxDiag:

            Card name: Intel(R) Iris(R) Xe Graphics
                    Manufacturer: Intel Corporation
                       Chip type: Intel(R) **Iris**(R) Xe Graphics Family
                        DAC type: Internal
                     Device Type: Full Device (POST)
                      Device Key: Enum\PCI\VEN_8086&DEV_9A49&SUBSYS_0A211028&REV_01
                   Device Status: 0180200A [DN_DRIVER_LOADED|DN_STARTED|DN_DISABLEABLE|DN_NT_ENUMERATOR|DN_NT_DRIVER] 
             Device Problem Code: No Problem
             Driver Problem Code: Unknown
                  Display Memory: 8189 MB
                Dedicated Memory: 128 MB
                   Shared Memory: 8061 MB
                    Current Mode: 1920 x 1080 (32 bit) (60Hz)
                     HDR Support: Not Supported
                Display Topology: Extend
             Display Color Space: DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
                 Color Primaries: Red(0.648438,0.329102), Green(0.294922,0.619141), Blue(0.144531,0.058594), White Point(0.313477,0.329102)
               Display Luminance: Min Luminance = 0.500000, Max Luminance = 270.000000, MaxFullFrameLuminance = 270.000000
                    Monitor Name: Generic PnP Monitor
                   Monitor Model: unknown
                      Monitor Id: BOE093E
                     Native Mode: 1920 x 1080(p) (60.003Hz)
                     Output Type: Internal
            Monitor Capabilities: HDR Not Supported
            eyllanescE 1 Reply Last reply 29 Sept 2021, 19:13
            0
            • H horsefeathers
              29 Sept 2021, 18:52

              @JonB @SGaist the above unfortunately doesn't seem to make a difference in my situation. I believe both QT_DEBUG_PLUGINS and QTWEBENGINE_CHROMIUM_FLAGS are working as intended.

              Some maybe relative tidbits from DxDiag:

              Card name: Intel(R) Iris(R) Xe Graphics
                      Manufacturer: Intel Corporation
                         Chip type: Intel(R) **Iris**(R) Xe Graphics Family
                          DAC type: Internal
                       Device Type: Full Device (POST)
                        Device Key: Enum\PCI\VEN_8086&DEV_9A49&SUBSYS_0A211028&REV_01
                     Device Status: 0180200A [DN_DRIVER_LOADED|DN_STARTED|DN_DISABLEABLE|DN_NT_ENUMERATOR|DN_NT_DRIVER] 
               Device Problem Code: No Problem
               Driver Problem Code: Unknown
                    Display Memory: 8189 MB
                  Dedicated Memory: 128 MB
                     Shared Memory: 8061 MB
                      Current Mode: 1920 x 1080 (32 bit) (60Hz)
                       HDR Support: Not Supported
                  Display Topology: Extend
               Display Color Space: DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
                   Color Primaries: Red(0.648438,0.329102), Green(0.294922,0.619141), Blue(0.144531,0.058594), White Point(0.313477,0.329102)
                 Display Luminance: Min Luminance = 0.500000, Max Luminance = 270.000000, MaxFullFrameLuminance = 270.000000
                      Monitor Name: Generic PnP Monitor
                     Monitor Model: unknown
                        Monitor Id: BOE093E
                       Native Mode: 1920 x 1080(p) (60.003Hz)
                       Output Type: Internal
              Monitor Capabilities: HDR Not Supported
              eyllanescE Offline
              eyllanescE Offline
              eyllanesc
              wrote on 29 Sept 2021, 19:13 last edited by
              #6

              @horsefeathers try with: QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu" python main.py

              If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved