Ensures that decks refresh properly even if the webview has previously
failed to load due to a bug (such as the render routine being called
while the collection is closed)
A race condition could cause domDone to get stuck on false, causing
any further bridge messages and setHtml() calls to be ignored. Fix
the issue by clearing pending actions and resetting domDone when
setting HTML.
Caught exception:
File "aqt\main.py", line 237, in onOpenBackup
File "aqt\profiles.py", line 264, in backupFolder
File "aqt\profiles.py", line 274, in _ensureExists
File "os.py", line 220, in makedirs
<class 'FileNotFoundError'>: [WinError 3] The system cannot find the path specified: 'C:\\Users\\xxx\\AppData\\Roaming\\Anki2\\xxx \\backups'
Can't reproduce the issue, but it seems the user was able to open the
preferences screen when no collection was loaded. If an error was
caught in loadCollection() the main window was not being hidden, so
perhaps a timing issue was preventing the profiles screen from taking
modal focus.
Removed the check in the prefs init - it is hopefully no longer
necessary, and returning before QDialog.__init__() was called was
causing the problem.
Caught exception:
File "aqt/webview.py", line 27, in cmd
File "aqt/webview.py", line 85, in _onCmd
File "aqt/webview.py", line 360, in _onBridgeCmd
File "aqt/toolbar.py", line 56, in _linkHandler
File "aqt/toolbar.py", line 80, in _syncLinkHandler
File "aqt/main.py", line 669, in onSync
File "aqt/main.py", line 365, in unloadCollection
File "aqt/main.py", line 611, in closeAllWindows
File "aqt/__init__.py", line 110, in closeAll
<class 'RuntimeError'>: super-class __init__() of type Preferences was never called
presumably happening if multiple requests are sent before previous
response fetch times out
Caught exception:
File "aqt/webview.py", line 314, in handler
File "aqt/editor.py", line 351, in <lambda>
File "aqt/addcards.py", line 225, in afterSave
File "aqt/addcards.py", line 231, in doClose
File "aqt/addcards.py", line 210, in _reject
File "anki/sound.py", line 417, in clearAudioQueue
File "anki/sound.py", line 117, in clearQueue
File "anki/mpv.py", line 558, in command
File "anki/mpv.py", line 352, in _send_request
File "anki/mpv.py", line 311, in _send_message
<class 'anki.mpv.MPVTimeoutError'>: unable to put request
- don't require collection for initial blank content
- defer profile load until initial blank content loaded
- use plain text for blank content to prevent initial flash of white
qtwebengineprocess.exe inherits the current working directory, so if
it is started after the profile is loaded, it prevents the profile
media folder from being renamed/deleted
also, load profile on first run at the same point we normally load
the profile
Addresses a rare instance of update checks failing when locally
installed packages point to a shared ID that has yet to be updated
to 2.1. In those instances Anki's update API returns null, which
causes a ValueError downstream when comparing the timestamps
against each other.