hellerbarde/stapler

Module 'itertools' has no attribute 'izip_longest'

Closed this issue · 5 comments

The background mode is broken for me using Python 3.8

poetry run stapler background input.pdf whitepages.pdf print.pdf

File "/home/carp/.cache/pypoetry/virtualenvs/api-V8JIOIWf-py3.8/src/stapler/staplelib/commands.py", line 179, in background for pagelist in list(itertools.izip_longest(*filestozip)): Error: module 'itertools' has no attribute 'izip_longest'

For Python 3, you can change izip_longest to zip_longest. With this change, the background command works for me.

https://docs.python.org/3/library/itertools.html#itertools.zip_longest

This should be fixed by #74. @karpfediem could you test if the problem has been resolved?

Can confirm the background mode is working again in latest master, thanks!

Thanks!

I am on the newest package on fedora 36 and the error is still present. See https://koji.fedoraproject.org/koji/buildinfo?buildID=1890557

How can I use the latest from master? I did not find any installation instructions. Thanks

Seems like fedora is still packaging a pretty old version
I would suggest simply adding the dependency with poetry or pip using the git url:
poetry new .
poetry add git+https://github.com/hellerbarde/stapler.git