Skip to content

pypy compatibility #31

Open
Open
@tomaszputon

Description

@tomaszputon

Hi,
Today I've installed pyPdf 1.13 for PyPy 1.6 using easy_install.
It doesn't work, but the bug fix is increadibly simple. Just change line 200 of pyPdf/generic.py.

original one:
int.init(value)

bug fix:
super(int, self).init(value)

Sorry for not directly contributing patch, but I'm new to github.

BTW, the error that I got was:

Traceback (most recent call last):
File "app_main.py", line 53, in run_toplevel
File "crack_passwd.py", line 11, in
reader = PdfFileReader(file('ZAJECIA5-PRZYROWNANIE_SEKWENCJI.pdf', 'rb'))
File "/Users/tomek/pypy-1.6/site-packages/pyPdf/pdf.py", line 374, in init
self.read(stream)
File "/Users/tomek/pypy-1.6/site-packages/pyPdf/pdf.py", line 732, in read
num = readObject(stream, self)
File "/Users/tomek/pypy-1.6/site-packages/pyPdf/generic.py", line 87, in readObject
return NumberObject.readFromStream(stream)
File "/Users/tomek/pypy-1.6/site-packages/pyPdf/generic.py", line 236, in readFromStream
return NumberObject(name)
File "/Users/tomek/pypy-1.6/site-packages/pyPdf/generic.py", line 220, in init
int.init(value)

Now it's fixed!!!

Cheers,
paparazzo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions