0.5.0 fails to run on Windows #179
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
img2pdf 0.5.0 is broken on Windows, it fails with error:
I get the same error in 3 environments: installed by pip in native Python for Windows, installed by pip in MSYS2/MinGW64 and with your provided .exe package.
This seems to be caused by 7f0bf47ff3 src/img2pdf.py: reformat with black:
The 'pdfa' argument is not created at all on win32 platform
I don't know exactly why this option is not supported on Windows (and I don't use PDF/A support), maybe it should either just be left enabled but marked as not supported (maybe with a warning), or at least forced to None some way or another.
(and, by the way, thanks for this very useful utility !)
Thank you for the investigation! May I highlight you for future issues with Windows? In most cases when people reported Windows issues, they did not know how to install img2pdf on their platform in different ways or how to investigate git commits. I do not own any Windows box myself so usually Windows issues remain unfixed as I'm unable to investigate them.
Your analysis was spot-on. I unintentionally added a change that I was not with yet finished without noticing it. If you have time, could you test if the following patch fixes the issue:
Thanks!
I am having the issue on Windows. What would be the pip3 command to apply the patch?
You don't do git with pip. What you want to do, is clone this git repository, apply the patch with
git apply
orpatch -p1
and then startsrc/img2pdf.py
and see if it's fixed.This could be because I am a rookie, but I am getting this error:
git apply patch.txt
warning: src/img2pdf.py has type 100644, expected 100755
error: patch failed: src/img2pdf.py:3814
error: src/img2pdf.py: patch does not apply
So that you do not have to bother with patches I made this into a commit with a merge request: #180
I also pushed this to github so there is now a new exe on appveyor in case you do not to run it from git:
https://ci.appveyor.com/project/josch/img2pdf/builds/48465352/artifacts
Thank you, this fixed the problem for me. :-)