View Single Post
Old 10-12-2019, 09:05 PM   #1284
JAIvY
Member
JAIvY began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jun 2019
Device: Kindle PaperWhite 3 (7th Generation)
CLI Version of KCC

Edit: So following this I seem to have fixed my problem. My misunderstanding was that both the file name and the file directory was required to run the process. However, it seems to be either depending on the type of conversion that's required. The fixed code that work is as follows.
[CODE]python kcc-c2e.py -m --upscale profile=KPW --splitter=1 --format=MOBI "img_store/Boku no Hero Academia/Boku no Hero Academia 243 Chapter 243.cbz"
[\CODE]

Hi, I have a problem occurring in the CLI version of KCC. Essentially, I am unable to consistently run the program and make a file conversion. I run into a lot of
Code:
UserWarning: Failed to open source file/directory.
However, if I run the exact same command line again, it works, except after the conversion is finished, it tries to run again and gives another Failed to open source file/directory error. This doesn't stop the conversion of the file but is strange as I'm only entering one file path at a time. I am unsure about this problem as I would expect the command line to either work or not work, not sometimes work??

The command line I am entering is as follows:
Code:
python kcc-c2e.py -m --upscale --profile=KPW --splitter=1 --format=MOBI "Boku no Hero Academia 243 Chapter 243.cbz" / "img_
store/Boku no Hero Academia/Boku no Hero Academia 243 Chapter 243.cbz"
Where I'm using a relative path, but I have had success entering a full absolute path but I'm required to enter the absolute path for both the filename and the file directory and this exhibits the same problems as previously mentioned. Any help would be much appreciated!

Here is some of the output from the terminal to show the problem a bit better, this just running the command code twice in a row.
Code:
python kcc-c2e.py -m --upscale --profile=KPW --splitter=1 --format=MOBI "img_store/Boku no Hero Academia/Boku no Hero Acade
mia 243 Chapter 243.cbz" / "img_store/Boku no Hero Academia/Boku no Hero Academia 243 Chapter 243.cbz"
comic2ebook v5.5.1 - Written by Ciro Mattia Gonano and Pawel Jastrzebski.
Working on ...
Preparing source images...
Traceback (most recent call last):
  File "kcc-c2e.py", line 32, in <module>
    startC2E()
  File "C:\Users\PATHHERE\kindlecomicconverter\startup.py", line 49, in startC2E
    sys.exit(main(sys.argv[1:]))
  File "C:\Users\PATHHERE\kindlecomicconverter\comic2ebook.py", line 74, in main
    makeBook(source)
  File "C:\Users\PATHHERE\kindlecomicconverter\comic2ebook.py", line 1076, in makeBook
    path = getWorkFolder(source)
  File "C:\PATHHERE\kindlecomicconverter\comic2ebook.py", line 605, in getWorkFolder
    raise UserWarning("Failed to open source file/directory.")
UserWarning: Failed to open source file/directory.

python kcc-c2e.py -m --upscale --profile=KPW --splitter=1 --format=MOBI "img_store/Boku no Hero Academia/Boku no Hero Acade
mia 243 Chapter 243.cbz" / "img_store/Boku no Hero Academia/Boku no Hero Academia 243 Chapter 243.cbz"
comic2ebook v5.5.1 - Written by Ciro Mattia Gonano and Pawel Jastrzebski.
Working on img_store/Boku no Hero Academia/Boku no Hero Academia 243 Chapter 243.cbz...
Preparing source images...
Checking images...
Processing images...
Creating EPUB file...
Creating MOBI files...
Working on ...
Preparing source images...
Traceback (most recent call last):
  File "kcc-c2e.py", line 32, in <module>
    startC2E()
  File "C:\Users\PATHHERE\kindlecomicconverter\startup.py", line 49, in startC2E
    sys.exit(main(sys.argv[1:]))
  File "C:\Users\PATHHERE\kindlecomicconverter\comic2ebook.py", line 74, in main
    makeBook(source)                                                                                       
  File "C:\Users\PATHHERE\kindlecomicconverter\comic2ebook.py", line 1076, in makeBook
    path = getWorkFolder(source)                                                                         
  File "C:\Users\PATHHERE\kindlecomicconverter\comic2ebook.py", line 605, in getWorkFolder
    raise UserWarning("Failed to open source file/directory.")                             
UserWarning: Failed to open source file/directory.

Last edited by JAIvY; 10-15-2019 at 12:14 PM. Reason: Solved problem and updated question with my solution
JAIvY is offline   Reply With Quote