Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Captcha_Genrator - 'float' object cannot be interpreted as an integer #557

Open
eliassal opened this issue Dec 26, 2021 · 1 comment
Open

Comments

@eliassal
Copy link

eliassal commented Dec 26, 2021

Description

I am trying to run Captcha_Genrator.py (on a fedora 35 box with latest version of Python 3) but it is failing on the line
19- data = image.generate(random)

The error I get is as follows

[salam@linux Captcha_Genrator]$ python Captcha_Genrator.py
Traceback (most recent call last):
File "/home/salam/Documents/Projects/Python/python-mini-projects/projects/Captcha_Genrator/Captcha_Genrator.py", line 19, in
data = image.generate(random)
File "/home/salam/.local/lib/python3.10/site-packages/captcha/image.py", line 45, in generate
im = self.generate_image(chars)
File "/home/salam/.local/lib/python3.10/site-packages/captcha/image.py", line 228, in generate_image
im = self.create_captcha_image(chars, color, background)
File "/home/salam/.local/lib/python3.10/site-packages/captcha/image.py", line 212, in create_captcha_image
mask = im.convert('L').point(table)
File "/usr/lib64/python3.10/site-packages/PIL/Image.py", line 1676, in point
return self._new(self.im.point(lut, mode))
TypeError: 'float' object cannot be interpreted as an integer

Type of issue

  • [ X] Bug

Checklist:

  • [ X] I have read the project guidelines.
  • [X ] I have checked all the existing projects, before submitting a new project issue.
  • [X ] I have checked previous issues to avoid duplicates.
  • [ X] This issue will be meaningful for the project.
@tairan
Copy link

tairan commented Jan 12, 2022

I have same issue too, it looks a captcha bug with python3.

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

No branches or pull requests

2 participants