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

Downloads fail with --force-model-unique option #490

Open
Rycochet opened this issue Dec 26, 2024 · 0 comments
Open

Downloads fail with --force-model-unique option #490

Rycochet opened this issue Dec 26, 2024 · 0 comments

Comments

@Rycochet
Copy link

Describe the bug

Script fails to download when the --force-model-unique option is used. This was tested on both standalone and docker installs, with fresh installs (so no changed options).

This fails before creating a folder for the model, but the script catches the error and continues

To Reproduce

Passing the command line option --force-model-unique.

Specifically I have been running ofscraper --daemon 3600 --posts timeline --action download --username ALL --block-ads --force-model-unique, although the rest of the command line doesn't seem to make a difference.

Expected behavior

Media should be downloaded.

Screenshots/Logs

 2024-12-25 22:15:43:[filters.previous_download_filter:166]  reading database to retrive previous downloads
 2024-12-25 22:15:45:[filters.previous_download_filter:171]  Downloading unique media for model
 2024-12-25 22:15:45:[level.inner:11]  failed with exception: 'coroutine' object is not iterable
 2024-12-25 22:15:45:[level.inner:11]  Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/your_username/commands/managers/manager.py", line 41, in wrapper
    all_media, posts, like_posts = await post_media_process(
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/your_username/data/posts/post.py", line 64, in post_media_process
    filter_medias = filters.filtermediaFinal(insert_medias, username, model_id)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/your_username/filters/media/main.py", line 22, in filtermediaFinal
    return filterMediaFinalDownload(media, username, model_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/your_username/filters/media/main.py", line 74, in filterMediaFinalDownload
    return helpers.previous_download_filter(media, username=username, model_id=model_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/your_username/filters/media/filters.py", line 172, in previous_download_filter
    media_ids = set(
                ^^^^
TypeError: 'coroutine' object is not iterable

Config

Tried with a fresh install and unchanged default config, see reproduction above for command line options used.

System Info

Both:

  • Ubuntu 24.04.1 LTS
  • Docker 27.4.0

Additional context

Add any other context about the problem here.

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

1 participant