UltimaScraper icon indicating copy to clipboard operation
UltimaScraper copied to clipboard

Path Issues (OFRenamer?)

Open AlexDucks opened this issue 6 years ago • 6 comments

Not really sure how to describe this issue, but it seems the OFRenamer is struggling to handle the proper paths.

Not sure how to replicate besides trying to scrape the same creator (katiebanks), but I'm guessing it's related to scraping a story from back in June.

Here's the error I'm getting when trying to scrape:

2020-10-17 13:25:14,530 ERROR errors [Errno 2] No such file or directory: 'E:\\Data\\P\\OnlyFans\\..ofOnlyFanskatiebanksStories\\Free\\Videos\\2020-06-18_5eebaf965c8734380b3e8_source.mp4'
Traceback (most recent call last):
  File "C:\Python38\lib\shutil.py", line 788, in move
    os.rename(src, real_dst)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'E:\\Data\\P\\of\\OnlyFans\\katiebanks\\Stories\\Free\\Videos\\2020-06-18_5eebaf965c8734380b3e8_source.mp4' -> 'E:\\Data\\P\\OnlyFans\\..ofOnlyFanskatiebanksStories\\Free\\Videos\\2020-06-18_5eebaf965c8734380b3e8_source.mp4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\Data\P\OnlyFans\datascraper\main_datascraper.py", line 241, in start_datascraper
    result = x.start_datascraper(
  File "E:\Data\P\OnlyFans\modules\onlyfans.py", line 117, in start_datascraper
    results = prepare_scraper(
  File "E:\Data\P\OnlyFans\modules\onlyfans.py", line 473, in prepare_scraper
    main_helper.export_archive(
  File "E:\Data\P\OnlyFans\helpers\main_helper.py", line 165, in export_archive
    datas2 = ofrenamer.start(archive_path, json_settings)
  File "E:\Data\P\OnlyFans\extras\OFRenamer\start.py", line 136, in start
    metadata.valid = fix_metadata(
  File "E:\Data\P\OnlyFans\extras\OFRenamer\start.py", line 116, in fix_metadata
    old_folders = pool.starmap(start, product(
  File "C:\Python38\lib\multiprocessing\pool.py", line 372, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "C:\Python38\lib\multiprocessing\pool.py", line 771, in get
    raise self._value
  File "C:\Python38\lib\multiprocessing\pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "C:\Python38\lib\multiprocessing\pool.py", line 51, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "E:\Data\P\OnlyFans\extras\OFRenamer\start.py", line 112, in start
    filepath, old_filepath = update(filepath)
  File "E:\Data\P\OnlyFans\extras\OFRenamer\start.py", line 84, in update
    shutil.move(filepath, new_format)
  File "C:\Python38\lib\shutil.py", line 802, in move
    copy_function(src, real_dst)
  File "C:\Python38\lib\shutil.py", line 432, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\Python38\lib\shutil.py", line 261, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'E:\\Data\\P\\OnlyFans\\..ofOnlyFanskatiebanksStories\\Free\\Videos\\2020-06-18_5eebaf965c8734380b3e8_source.mp4'

AlexDucks avatar Oct 17 '20 11:10 AlexDucks

What's the file name format

UltimaHoarder avatar Oct 17 '20 11:10 UltimaHoarder

I haven't changed the filename format in months, but here:

"download_paths": [
    "E:\\Data\\P\\of\\{site_name}"
],
"file_directory_format": "",
"file_name_format": "{date}_{file_name}.{ext}",

For reference I used to have the download_paths set to ..\\..\\of\\{site_name}, which has been working fine for the past few days, so not sure what would make it suddenly not working. I tried updating it to E:\\Data\\P\\of\\{site_name} later and it seems to work for other creators, just not the error I've posted.

EDIT: Sorry, I miswrote. My download_paths was set to ../../of/{site_name} originally, but then I tried a few other formats.

Basically, this is what I've set them to recently:

  1. ../../of/{site_name} (Old one that I used for the past few days)
  2. ..\\..\\of\\{site_name} (Tried using escaped backslashes to see if it fixed it)
  3. E:\\Data\\P\\of\\{site_name} (Current one that I use that has full path with escaped backslashes).

AlexDucks avatar Oct 17 '20 11:10 AlexDucks

Try with single forward slashes only

UltimaHoarder avatar Oct 17 '20 12:10 UltimaHoarder

Same error when trying with: E:/Data/P/of/{site_name}

AlexDucks avatar Oct 17 '20 12:10 AlexDucks

You're gonna either have to delete the metadata or just edit the paths manually. It's the ".." that is messing it up

UltimaHoarder avatar Oct 17 '20 12:10 UltimaHoarder

Looks like deleting the metadata worked, cheers. I'll keep that in mind in case it happens another time.

AlexDucks avatar Oct 17 '20 12:10 AlexDucks