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

KeyError scraping messages if you have replied with a picture #2099

Open
kazoo-rarely-beaver opened this issue Apr 30, 2024 · 1 comment
Open

Comments

@kazoo-rarely-beaver
Copy link

Scraping messages for a specific model that I've sent attachments to and I get a KeyError for my user ID. My guess is that it's failing to scrape a message which is a reply with a picture from me (rather than from the model)

Processing Scraped Messages
  0%|                                                                                                                       | 0/34 [00:00<?, ?it/s]Traceback (most recent call last):
  File "/path/ofds/start_us.py", line 62, in <module>
    asyncio.run(main())
  File "/path/.pyenv/versions/3.10.13/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/path/.pyenv/versions/3.10.13/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/path/ofds/start_us.py", line 44, in main
    _api = await USR.start(
  File "/path/ofds/ultima_scraper/ultima_scraper.py", line 50, in start
    await self.start_datascraper(datascraper)
  File "/path/ofds/ultima_scraper/ultima_scraper.py", line 137, in start_datascraper
    await datascraper.datascraper.api.job_manager.process_jobs()
  File "/path/ofds/env/lib/python3.10/site-packages/ultima_scraper_api/managers/job_manager/job_manager.py", line 45, in process_jobs
    await asyncio.create_task(self.__worker())
  File "/path/ofds/env/lib/python3.10/site-packages/ultima_scraper_api/managers/job_manager/job_manager.py", line 53, in __worker
    await job.task
  File "/path/ofds/env/lib/python3.10/site-packages/ultima_scraper_collection/modules/module_streamliner.py", line 202, in prepare_scraper
    await self.process_scraped_content(
  File "/path/ofds/env/lib/python3.10/site-packages/ultima_scraper_collection/modules/module_streamliner.py", line 237, in process_scraped_content
    unrefined_set: list[dict[str, Any]] = await tqdm_asyncio.gather(
  File "/path/ofds/env/lib/python3.10/site-packages/tqdm/asyncio.py", line 79, in gather
    res = [await f for f in cls.as_completed(ifs, loop=loop, timeout=timeout,
  File "/path/ofds/env/lib/python3.10/site-packages/tqdm/asyncio.py", line 79, in <listcomp>
    res = [await f for f in cls.as_completed(ifs, loop=loop, timeout=timeout,
  File "/path/.pyenv/versions/3.10.13/lib/python3.10/asyncio/tasks.py", line 571, in _wait_for_one
    return f.result()  # May raise f.exception().
  File "/path/ofds/env/lib/python3.10/site-packages/tqdm/asyncio.py", line 76, in wrap_awaitable
    return i, await f
  File "/path/ofds/env/lib/python3.10/site-packages/ultima_scraper_collection/managers/datascraper_manager/datascrapers/onlyfans.py", line 61, in media_scraper
    reformat_item = reformat_manager.prepare_reformat(asset)
  File "/path/ofds/env/lib/python3.10/site-packages/ultima_scraper_renamer/reformat.py", line 372, in prepare_reformat
    download_path = self.filesystem_manager.get_directory_manager(
  File "/path/ofds/env/lib/python3.10/site-packages/ultima_scraper_collection/managers/filesystem_manager.py", line 55, in get_directory_manager
    return self.directory_manager_users[user_id]
KeyError: 123456789
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