Starting the import in a timer could cause the collection to be unloaded
while the deck list was being displayed, leading to an inconsistent
state.
The timer was originally required to avoid importing on startup,
but profile load is already delayed until after startup these days,
so the workaround should no longer be necessary.
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