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

TypeError: 'float' object cannot be interpreted as an integer on Python 3.10.0 #51

Closed
BennyThink opened this issue Dec 8, 2021 · 2 comments

Comments

@BennyThink
Copy link

~ # python3
Python 3.10.0 (default, Nov 13 2021, 03:23:03) [GCC 10.3.1 20210424] on linux
Type "help", "copyright", "credits" or "license" for more information.

from captcha.image import ImageCaptcha

image = ImageCaptcha()
data = image.generate("chars")
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.10/site-packages/captcha/image.py", line 45, in generate
im = self.generate_image(chars)
File "/usr/local/lib/python3.10/site-packages/captcha/image.py", line 228, in generate_image
im = self.create_captcha_image(chars, color, background)
File "/usr/local/lib/python3.10/site-packages/captcha/image.py", line 212, in create_captcha_image
mask = im.convert('L').point(table)
File "/usr/local/lib/python3.10/site-packages/PIL/Image.py", line 1680, in point
return self._new(self.im.point(lut, mode))
TypeError: 'float' object cannot be interpreted as an integer

~ # pip list
Package Version


captcha 0.3
Pillow 8.4.0
pip 21.2.4
setuptools 57.5.0
wheel 0.37.0

@klkvr
Copy link
Contributor

klkvr commented Jan 1, 2022

Fixed by #52

@coder2020official
Copy link

Is this still valid?

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

4 participants