Open wisewtf opened 3 years ago
You're probably running it with python2. On debian/ubuntu (and anything like that), the "python" command will stay python2 by default (even whenit is removed, that's happening now in debian I think). i don't know what other distributions do. This script is python3.
You either need to change the /usr/bin/python link or modify cbr2cbz.py to #!/usr/bin/python3
I was also confused for a short time on this.
You could easily "fix" this by replacing the #!/usr/bin/python
with #!/usr/bin/env python3
at the top of the script. This allows it to find whichever your current default python3 is which is really important when you run in virtual python environments.
This method also follows the official recommendation:
https://www.python.org/dev/peps/pep-0394/#recommendation
I don't mind pulling this and suggesting the change.
Thanks for the pointer. I've changed the shebang to #!/usr/bin/env python3 and pushed to a new test branch - should add some tempdir autodetection/safety improvements to it also.
Promoted to the default branch.
I've been testing out the script, but I haven't been able to get past this:
Source directory contains one .cbr file called "'Taskmaster 005 (2021) (John_Williams).cbr" and destination folder exists and has correct permissions.
As far as I am aware a
/tmp/cbr2cbztemp-u1000/p1002996/Taskmaster 005 (2021) (John_Williams)
folder is correctly created containing all extracted pages from the.cbr
but then it fails.I am not sure what exactly is failing on 'FileExists', I have tried removing everything and starting from scratch even going as far as not having a destination folder created,
thinking the script would do it itself.<- It does create it on its own but it still won't work.I haven't been able to get a successful run on the script ever so I can't test for proper funcionality at all. Is it a problem with naming scheme of the archive contents? Even renaming the
.cbr
to a single clean string doesn't work.