Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred while generating a mobile card! #43

Open
Friedrich0420 opened this issue Jan 9, 2025 · 3 comments
Open

An error occurred while generating a mobile card! #43

Friedrich0420 opened this issue Jan 9, 2025 · 3 comments

Comments

@Friedrich0420
Copy link

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.19041
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2025-01-09 12:49:34

Caught exception:
Traceback (most recent call last):
File "C:\Users\86155\AppData\Roaming\Anki2\addons21\939347702\player.py", line 610, in run
logger.debug('ffprobe audio_streams: {}'.format(join_and_add_double_quotes(cmd)))
File "C:\Users\86155\AppData\Roaming\Anki2\addons21\939347702\player.py", line 518, in join_and_add_double_quotes
return '[' + ' '.join(['"{}"'.format(s) if ' ' in s else s for s in cmd]) + ']'
File "C:\Users\86155\AppData\Roaming\Anki2\addons21\939347702\player.py", line 518, in
return '[' + ' '.join(['"{}"'.format(s) if ' ' in s else s for s in cmd]) + ']'
TypeError: argument of type 'NoneType' is not iterable

@kelciour
Copy link
Owner

kelciour commented Jan 9, 2025

Try installing the latest Anki version, or at least Anki 2.1.66, and updating the add-on to the latest version.

@Friedrich0420
Copy link
Author

I installed the latest anki and updated the plugin, but this problem occurs when making a mobile card

Anki 24.11 (87ccd24e) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.19041

Traceback (most recent call last):
File "C:\Users\86155\AppData\Roaming\Anki2\addons21\939347702\player.py", line 1241, in update_media
logger.debug('ffprobe audio_streams: {}'.format(join_and_add_double_quotes(cmd)))
File "C:\Users\86155\AppData\Roaming\Anki2\addons21\939347702\player.py", line 600, in join_and_add_double_quotes
return '[' + ' '.join(['"{}"'.format(s) if ' ' in s else s for s in cmd]) + ']'
File "C:\Users\86155\AppData\Roaming\Anki2\addons21\939347702\player.py", line 600, in
return '[' + ' '.join(['"{}"'.format(s) if ' ' in s else s for s in cmd]) + ']'
TypeError: argument of type 'NoneType' is not iterable

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Cards Own Voice ['1223252871', 2022-10-03T11:30, 'None', '']
Watch Foreign Language Movies with Anki ['939347702', 2024-04-30T02:36, 'None', mod]

===IDs of active AnkiWeb add-ons===
1223252871 939347702

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])

@kelciour
Copy link
Owner

kelciour commented Jan 10, 2025

For some reason, the add-on wasn't able to detect any audio streams in the video file using mpv and fallback to ffmpeg that couldn't be found.

If the provided video file contains an audio stream, try to install ffmpeg via scoop and reopen Anki.

or download ffmpeg-git-full.7z from https://www.gyan.dev/ffmpeg/builds/, unzip it somewhere and add the full path to folder with ffmpeg.exe and ffprobe.exe, e.g. C:\Programs\ffmpeg\bin, to the PATH environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants