from_bytes() missing required argument 'byteorder' (pos 2)
rollingQP opened this issue · 1 comments
rollingQP commented
Hi, I frequently got the error
in get_image_properties
self.width = int.from_bytes(self.bin[16:20])
TypeError: from_bytes() missing required argument 'byteorder' (pos 2)
I think the reason for that could be the differences between Python versions, and in your version of Python, 'byteorder' might be an optional argument. I am currently using Python 3.10.11 on Windows. Could you specify which version are you using?
ICE27182 commented
Yes, I think it is due to the Python version difference.
I am using Python 3.11.4 and I replicated the error by executing the program with Python 3.9.13.
You may fix this error by adding byteorder="big" argument to every int.from_byte method in png.py, or you may re-pull from this repository.