In PyQt5, how do you flush the cookie store to disk on application exit? [External Public Use]

michael h michaelkenth at gmail.com
Sat Sep 5 00:59:39 BST 2020


>
>
>
> I have a program in Python3 using PyQt5 in Windows 10 that launches a
> browser window to do a few tasks, and then closes it.  I have configured a
> persistent cookie store in a specific location on disk, and I see it being
> used.  The problem I'm running into is that new or changed cookies aren't
> written to disk for almost a full minute.  If the application is closed
> before that point, then the cookies are lost.  If I always wait a full
> minute before closing the application, then the cookies are present when I
> next open it.  I can see this, as well, if I open the folder in Explorer
> and press F5 over and over until I see the files Cookies and
> Cookies.journal update.
>
>
>
We had a thread that sounded related in the past and this bug was linked:

https://bugreports.qt.io/browse/QTBUG-58675

If related the linked change to the demobrowser may give you a hint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200904/18b60df2/attachment.htm>


More information about the PyQt mailing list