Error when adding audio file

Hi all

I’m getting a repeated error when adding MP3 files to new cards using Anki Desktop on a Mac (error message pasted below).

A second (related?) problem is that if I review cards on Anki Desktop, then the audio either doesn’t play unless I wait a long time (over a minute) or doesn’t play at all. (I usually review cards on my iPad, so this isn’t a major problem.)

I’ve tried the “check database” and “check audio” tools, as well restarting both Anki and my computer, but the same error message appears shortly afterwards.

Grateful for any tips for resolving these problems.

Thank you in advance.

Error message follows…

Error
An error occurred. Please use Tools > Check Database to see if that fixes the problem.
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.
Anki 2.1.23 (de9543ff) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1
Platform: Mac 10.14.6
Flags: frz=True ao=False sv=1
Add-ons, last update check: 2020-06-25 10:10:13

Caught exception:
Traceback (most recent call last):
File “aqt/editor.py”, line 992, in dropEvent
File “aqt/editor.py”, line 1019, in _processMime
File “aqt/editor.py”, line 1033, in _processUrls
File “aqt/editor.py”, line 701, in urlToLink
File “aqt/editor.py”, line 719, in urlToFile
File “aqt/editor.py”, line 803, in _retrieveURL
File “anki/media.py”, line 99, in write_data
File “anki/rsbackend.py”, line 309, in add_file_to_media_folder
File “anki/rsbackend.py”, line 212, in _run_command
anki.rsbackend.DBError: DBError { info: “SqliteFailure(Error { code: DatabaseBusy, extended_code: 5 }, Some(“database is locked”))” }

Please try updating to 2.1.26

Thanks, Dae.

I updated to 2.1.26, and it worked for a while and then I got the following error message when trying to add audio to a new card.

Any other ideas?

Thank you in advance.


Error
An error occurred. Please use Tools > Check Database to see if that fixes the problem.
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.
Anki 2.1.26 (70784154) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1
Platform: Mac 10.14.6
Flags: frz=True ao=False sv=1
Add-ons, last update check: 2020-06-27 19:19:11

Caught exception:
Traceback (most recent call last):
File “aqt/editor.py”, line 1025, in dropEvent
File “aqt/editor.py”, line 1052, in _processMime
File “aqt/editor.py”, line 1066, in _processUrls
File “aqt/editor.py”, line 733, in urlToLink
File “aqt/editor.py”, line 751, in urlToFile
File “aqt/editor.py”, line 835, in _retrieveURL
File “anki/media.py”, line 99, in write_data
File “anki/rsbackend.py”, line 391, in add_file_to_media_folder
File “anki/rsbackend.py”, line 257, in _run_command
anki.rsbackend.DBError: DBError { info: “SqliteFailure(Error { code: DatabaseBusy, extended_code: 5 }, Some(“database is locked”))”, kind: Other }

The next time it happens, please go into the preferences screen and click on Media Log. Does it indicate any media syncing activity around the time the problem occurred? I’m wondering if an automatic sync happened to start and whether that may be causing it.

Yes, it appears there was media syncing activity when the error occurred - after I’d added 7 new cards. Media sync log below.

I was wondering if there was anyway to stop the media log happening so frequently…?

Thank you in advance.

Tue Jun 30 22:54:49 2020: Media sync starting…

Tue Jun 30 22:54:57 2020: Added: ⁨7⁩↑ ⁨0⁩↓, Removed: ⁨0⁩↑ ⁨0⁩↓, Checked: ⁨0⁩

Tue Jun 30 22:55:43 2020: Added: ⁨7⁩↑ ⁨0⁩↓, Removed: ⁨0⁩↑ ⁨0⁩↓, Checked: ⁨0⁩

Tue Jun 30 22:55:43 2020: Media sync complete.

Thanks for the report, I’ll look into it.

The next build should fix the error from occurring, and will add an option to disable automatic media syncing.

Great - many thanks.