DIGITALCRIMINAL / ArchivedUltimaScraper

Scrape content from OnlyFans and Fansly
GNU General Public License v3.0
946 stars 39 forks source link

FileNotFoundError loop #1023

Open stubblesticker opened 1 year ago

stubblesticker commented 1 year ago

So I hadn't used the scraper in a few weeks and the usual problems cropped up, auth, updating, etc...

I've updated the auth information, I've updated the scripts by running updater.py, but when I run the script using "poetry run python start_us.py" it fails on a model and says:

# poetry run python start_us.py
[2023-07-05 16:01:21] Assigning Jobs
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/shutil.py", line 825, in move
    os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/<absolute path to model>/Posts/Free/Images/Thumbs.db' -> '/<absolute path to model>/Metadata/Thumbs_2.db'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/<absolute path to script/start_us.py", line 62, in <module>
    asyncio.run(main())
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/<absolute path to script/start_us.py", line 44, in main
    _api = await USR.start(
           ^^^^^^^^^^^^^^^^
  File "/<absolute path to script/ultima_scraper/ultima_scraper.py", line 50, in start
    await self.start_datascraper(datascraper)
  File "/<absolute path to script/ultima_scraper/ultima_scraper.py", line 136, in start_datascraper
    await self.assign_jobs(final_job_user_list)
  File "/<absolute path to script/ultima_scraper/ultima_scraper.py", line 194, in assign_jobs
    metadata_manager = MetadataManager(user, filesystem_manager)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/ultima-scraper-WrXAudjS-py3.11/lib/python3.11/site-packages/ultima_scraper_collection/managers/metadata_manager/metadata_manager.py", line 307, in __init__
    self.update_metadata_filepaths()
  File "/root/.cache/pypoetry/virtualenvs/ultima-scraper-WrXAudjS-py3.11/lib/python3.11/site-packages/ultima_scraper_collection/managers/metadata_manager/metadata_manager.py", line 680, in update_metadata_filepaths
    self.filesystem_manager.move(metadata_filepath, new_m_f)
  File "/root/.cache/pypoetry/virtualenvs/ultima-scraper-WrXAudjS-py3.11/lib/python3.11/site-packages/ultima_scraper_collection/managers/filesystem_manager.py", line 44, in move
    shutil.move(src, trg)
  File "/usr/local/lib/python3.11/shutil.py", line 845, in move
    copy_function(src, real_dst)
  File "/usr/local/lib/python3.11/shutil.py", line 436, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/lib/python3.11/shutil.py", line 256, in copyfile
    with open(src, 'rb') as fsrc:
         ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/<absolute path to model>/Posts/Free/Images/Thumbs.db'

If I do a touch '//Posts/Free/Images/Thumbs.db', it will fail again, but on a different model, sometimes in some legacy metadata folder. I can keep doing this run/touch combination about 5 or 6 times before it loops back around to not being able to find files I created previously.

What's going on here?

dairyroach commented 1 year ago

I was getting that issue before. My workaround was to just start a new download folder, but if storage is an issue, it's not ideal...

fyhtma commented 1 year ago

same here:

Traceback (most recent call last): File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 825, in move os.rename(src, realdst) FileNotFoundError: [WinError 3] Määritettyä polkua ei löydy: 'M:\OnlyFans\.sites\OnlyFans\kristinarose\Posts\Free\ \Images\2023-04-21💖 LIVE SHOW TONIGHT 5PM 🕔 (PST) 8PM 🕗 (EST) 🎉 L_3024x4032_02dcfb4ff3bb1a53ce8d18a9caf540a5.jpg' -> 'M:\OnlyFans\.sites\OnlyFans\kristinarose\Messages\Free\Images\2023-04-21_LIVE SHOW TONIGHT 5PM 🕔 (pst) \ 8PM 🕗 (est) 🎉 Let_3024x4032_02dcfb4ff3bb1a53ce8d18a9caf540a5.jpg'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "M:\OnlyFans\extras\OFRenamer\start_ofr.py", line 123, in fix_directories2 moved = shutil.move(old_filepath, new_filepath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 845, in move copy_function(src, real_dst) File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 436, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 258, in copyfile with open(dst, 'wb') as fdst: ^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'M:\OnlyFans\.sites\OnlyFans\kristinarose\Messages\Free\I mages\2023-04-21_LIVE SHOW TONIGHT 5PM 🕔 (pst) \ 8PM 🕗 (est) 🎉 Let_3024x4032_02dcfb4ff3bb1a53ce8d18a9caf540a5.jpg'

Traceback (most recent call last): File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 825, in move os.rename(src, realdst) FileNotFoundError: [WinError 3] Määritettyä polkua ei löydy: 'M:\OnlyFans\.sites\OnlyFans\kristinarose\Posts\Free\ \Images\2023-04-21💖 LIVE SHOW TONIGHT 5PM 🕔 (PST) 8PM 🕗 (EST) 🎉 L_3024x4032_02dcfb4ff3bb1a53ce8d18a9caf540a5.jpg' -> 'M:\OnlyFans\.sites\OnlyFans\kristinarose\Messages\Free\Images\2023-04-21_LIVE SHOW TONIGHT 5PM 🕔 (pst) \ 8PM 🕗 (est) 🎉 Let_3024x4032_02dcfb4ff3bb1a53ce8d18a9caf540a5.jpg'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "M:\OnlyFans\extras\OFRenamer\start_ofr.py", line 123, in fix_directories2 moved = shutil.move(old_filepath, new_filepath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 845, in move copy_function(src, real_dst) File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 436, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 258, in copyfile with open(dst, 'wb') as fdst: ^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'M:\OnlyFans\.sites\OnlyFans\kristinarose\Messages\Free\I mages\2023-04-21_LIVE SHOW TONIGHT 5PM 🕔 (pst) \ 8PM 🕗 (est) 🎉 Let_3024x4032_02dcfb4ff3bb1a53ce8d18a9caf540a5.jpg'

Traceback (most recent call last): File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 825, in move os.rename(src, realdst) FileNotFoundError: [WinError 3] Määritettyä polkua ei löydy: 'M:\OnlyFans\.sites\OnlyFans\kristinarose\Posts\Free\ \Images\2023-04-21💖 LIVE SHOW TONIGHT 5PM 🕔 (PST) 8PM 🕗 (EST) 🎉 L_3024x4032_02dcfb4ff3bb1a53ce8d18a9caf540a5.jpg' -> 'M:\OnlyFans\.sites\OnlyFans\kristinarose\Messages\Free\Images\2023-04-21_LIVE SHOW TONIGHT 5PM 🕔 (pst) \ 8PM 🕗 (est) 🎉 Let_3024x4032_02dcfb4ff3bb1a53ce8d18a9caf540a5.jpg'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "M:\OnlyFans\extras\OFRenamer\start_ofr.py", line 123, in fix_directories2 moved = shutil.move(old_filepath, new_filepath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 845, in move copy_function(src, real_dst) File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 436, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 258, in copyfile with open(dst, 'wb') as fdst: