Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: not enough values to unpack (expected 1, got 0) #105

Open
ms3534 opened this issue Jul 21, 2022 · 2 comments
Open

ValueError: not enough values to unpack (expected 1, got 0) #105

ms3534 opened this issue Jul 21, 2022 · 2 comments

Comments

@ms3534
Copy link

ms3534 commented Jul 21, 2022

import os
from PyPDF4 import PdfFileReader, PdfFileMerger
from PIL import Image
from PIL import ImageFile
import argparse
import string
import collections

def png_to_pdf():
merger = PdfFileMerger()
merger.append(PdfFileReader(open('C:\file-0.pdf', 'rb')))

def main():
png_to_pdf()

main()

error
file-0.pdf

@pubpub-zz
Copy link

@ms3534 ,
PyPDF4 is no more active whereas PyPDF2 is. I've tried your test file in PyPDF2 and the error is confirmed there too. I will analyze the issue and try to produce a fix ; to do that can you duplicate the issue in https://github.com/py-pdf/PyPDF2 ?

also this code is a minimized test version

from PyPDF2 import PdfFileReader, PdfFileMerger
merger = PdfFileMerger()
merger.append(PdfFileReader(open('C:\file-0.pdf', 'rb')))

@ms3534
Copy link
Author

ms3534 commented Jul 22, 2022

Thanks @pubpub-zz, added a ticket on PyPDF2: py-pdf#1145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants