DreamCobbler / fiction-dl

A content downloader, capable of retrieving works of (fan)fiction from the web and saving them in a few common file formats.
GNU General Public License v3.0
46 stars 2 forks source link

Entire program terminates because of a error in one link. #9

Closed Anangaya closed 3 years ago

Anangaya commented 3 years ago

Here is the error (I didn't reduce any details, please don't be offended!)

Creating the extractor...

Extractor created: "ExtractorHentaiFoundry".

Scanning the story... ┌─────────────────┬───────────────────────┐ │ Title: │ Bitchbreaker Lucifer │ ├─────────────────┼───────────────────────┤ │ Author: │ Delaware │ ├─────────────────┼───────────────────────┤ │ Date published: │ Oct 16, 2020 │ ├─────────────────┼───────────────────────┤ │ Date updated: │ Oct 19, 2020 │ ├─────────────────┼───────────────────────┤ │ Chapter count: │ 3 │ ├─────────────────┼───────────────────────┤ │ Word count: │ 19,945 │ └─────────────────┴───────────────────────┘

Extracting content...

Extracted chapter 3/3: |█████████████████████████████████████████████|

Downloading images...

Found 0 image(s).

Processing content...

Content processed.

Formatting and saving the story... ERROR:root:Failed to format the stories as HTML. Traceback (most recent call last): File "c:\users\anangaya\appdata\local\programs\python\python38-32\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\anangaya\appdata\local\programs\python\python38-32\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\anangaya\AppData\Local\Programs\Python\Python38-32\Scripts\fiction-dl.exe__main.py", line 7, in File "c:\users\anangaya\appdata\local\programs\python\python38-32\lib\site-packages\fiction_dl__main__.py", line 93, in Main Application( File "c:\users\anangaya\appdata\local\programs\python\python38-32\lib\site-packages\fiction_dl\Core\Application.py", line 181, in Launch self._FormatAndSaveStoryOrPackage(newlyDownloadedStory) File "c:\users\anangaya\appdata\local\programs\python\python38-32\lib\site-packages\fiction_dl\Core\Application.py", line 486, in _FormatAndSaveStoryOrPackage if not formatter.FormatAndSave(story, filePaths["ODT"]): File "c:\users\anangaya\appdata\local\programs\python\python38-32\lib\site-packages\fiction_dl\Formatters\FormatterODT.py", line 215, in FormatAndSave with ZipFile(filePath, mode = "a") as outputArchive: File "c:\users\anangaya\appdata\local\programs\python\python38-32\lib\zipfile.py", line 1251, in init__ self.fp = io.open(file, filemode) FileNotFoundError: [Errno 2] No such file or directory: 'fiction-dl Downloads\Delaware\Bitchbreaker Lucifer \Bitchbreaker Lucifer .odt'

It happened when I was processing multiple links in a text file, so the program getting terminated is really annoying. Especially because the links are being processed randomly.

It would be great if you can make it move to the next link without terminating the entire program while giving message about the failure. Fixing the error is always welcome.

DreamCobbler commented 3 years ago

Should be fixed in 1.7.0.