Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Cache warnings on Windows 10, PyQt 5.7, after clicking url's in a QTextBrowser
Forum Updated to NodeBB v4.3 + New Features

Cache warnings on Windows 10, PyQt 5.7, after clicking url's in a QTextBrowser

Scheduled Pinned Locked Moved Unsolved Qt WebKit
5 Posts 2 Posters 4.5k 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.
  • E Offline
    E Offline
    edreamleo
    wrote on 19 Sept 2016, 19:18 last edited by
    #1

    Hello all,

    I am the author of Leo, a large Python/PyQt app. I have been happily using PyQt for a long time.

    The following issue only appears on Windows 10 using PyQt 5.7. There are no problems with the code on Ubuntu 16.04, and no problems anywhere with PyQt 4.x. All tests were made with Python 3.5.1.

    After clicking on a URL in Leo's body pane (A QTextBrowser), the next time I start Leo the following warnings appear in the console:

    [0918/053926:ERROR:cache_util_win.cc(20)] Unable to move the cache: 5
    [0918/053926:ERROR:cache_util.cc(134)] Unable to move cache folder C:\Users\edreamleo\AppData\Local\python\QtWebEngine\Default\GPUCache to C:\Users\edreamleo\AppData\Local\python\QtWebEngine\Default\old_GPUCache_000
    [0918/053926:ERROR:cache_creator.cc(129)] Unable to create cache
    [0918/053926:ERROR:shader_disk_cache.cc(589)] Shader Cache Creation failed: -2
    

    Restarting the computer removes these warnings until I once again click on a URL.

    The following python script:

    from PyQt5 import QtWebEngineWidgets
    wep = QtWebEngineWidgets.QWebEngineProfile()
    print('isOffTheRecord: %s cachePath: %r' % (
        wep.isOffTheRecord(), wep.cachePath()))
    

    prints:

    isOffTheRecord: True cachePath: ''
    

    So I'm stuck. It seems there is some strange caching going on behind the scenes, but I don't have any further ideas about how to suppress the warnings.

    Any ideas? Thanks.

    Edward

    E 1 Reply Last reply 22 Sept 2016, 15:24
    0
    • E Offline
      E Offline
      edreamleo
      wrote on 19 Sept 2016, 19:25 last edited by
      #2

      I forgot to mention that the warnings appear immediately on startup, as the result of executing

      sys.exit(self.qtApp.exec_())
      

      That is, they happen as soon as exec_() is called.

      1 Reply Last reply
      0
      • E edreamleo
        19 Sept 2016, 19:18

        Hello all,

        I am the author of Leo, a large Python/PyQt app. I have been happily using PyQt for a long time.

        The following issue only appears on Windows 10 using PyQt 5.7. There are no problems with the code on Ubuntu 16.04, and no problems anywhere with PyQt 4.x. All tests were made with Python 3.5.1.

        After clicking on a URL in Leo's body pane (A QTextBrowser), the next time I start Leo the following warnings appear in the console:

        [0918/053926:ERROR:cache_util_win.cc(20)] Unable to move the cache: 5
        [0918/053926:ERROR:cache_util.cc(134)] Unable to move cache folder C:\Users\edreamleo\AppData\Local\python\QtWebEngine\Default\GPUCache to C:\Users\edreamleo\AppData\Local\python\QtWebEngine\Default\old_GPUCache_000
        [0918/053926:ERROR:cache_creator.cc(129)] Unable to create cache
        [0918/053926:ERROR:shader_disk_cache.cc(589)] Shader Cache Creation failed: -2
        

        Restarting the computer removes these warnings until I once again click on a URL.

        The following python script:

        from PyQt5 import QtWebEngineWidgets
        wep = QtWebEngineWidgets.QWebEngineProfile()
        print('isOffTheRecord: %s cachePath: %r' % (
            wep.isOffTheRecord(), wep.cachePath()))
        

        prints:

        isOffTheRecord: True cachePath: ''
        

        So I'm stuck. It seems there is some strange caching going on behind the scenes, but I don't have any further ideas about how to suppress the warnings.

        Any ideas? Thanks.

        Edward

        E Offline
        E Offline
        edreamleo
        wrote on 22 Sept 2016, 15:24 last edited by
        #3

        Now I see what is going on. The warnings happen only if a version of Leo running PyQt5 is already open.

        Apparently, PyQt5 is holding the Python cache open even when Leo is not active. This looks like a bug in the Windows version of PyQt5.

        E 1 Reply Last reply 22 Sept 2016, 17:29
        0
        • E edreamleo
          22 Sept 2016, 15:24

          Now I see what is going on. The warnings happen only if a version of Leo running PyQt5 is already open.

          Apparently, PyQt5 is holding the Python cache open even when Leo is not active. This looks like a bug in the Windows version of PyQt5.

          E Offline
          E Offline
          edreamleo
          wrote on 22 Sept 2016, 17:29 last edited by
          #4

          It appears that instantiating a QWebView is all that is needed to hold the cache open. It would be good to tell the QWebView not to cache anything, but I have not discovered how to do that.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jonlee
            wrote on 26 Nov 2018, 13:54 last edited by
            #5

            Install Google Chrome, you can solve the problem:

            [0918/053926:ERROR:cache_util_win.cc(20)] Unable to move the cache: 5
            [0918/053926:ERROR:cache_util.cc(134)] Unable to move cache folder C:\Users\edreamleo\AppData\Local\python\QtWebEngine\Default\GPUCache to C:\Users\edreamleo\AppData\Local\python\QtWebEngine\Default\old_GPUCache_000
            [0918/053926:ERROR:cache_creator.cc(129)] Unable to create cache
            [0918/053926:ERROR:shader_disk_cache.cc(589)] Shader Cache Creation failed: -2

            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