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

encode_scaled return type error in python 3.x #12

Open
krwt opened this issue Aug 31, 2020 · 5 comments · May be fixed by #15
Open

encode_scaled return type error in python 3.x #12

krwt opened this issue Aug 31, 2020 · 5 comments · May be fixed by #15

Comments

@krwt
Copy link

krwt commented Aug 31, 2020

TypeError: integer argument expected, got float

in encode_scaled, / should be // to get interger result from a division

@themaddoctor
Copy link

Yes. And it won't break it on Python 2.

anarcat added a commit to anarcat/pyqrencode that referenced this issue Mar 3, 2023
encoded_scaled apparently fails with:

```
TypeError: integer argument expected, got float
```

in Python 3, and this patch *apparently* fixes that problem.

Fixes: Arachnid#12
@anarcat anarcat linked a pull request Mar 3, 2023 that will close this issue
@anarcat
Copy link

anarcat commented Mar 3, 2023

can you confirm #15 fixes this problem?

@themaddoctor
Copy link

Don't you want to change / to // in line 82 also?

@themaddoctor
Copy link

On my system, I replaced / with // in both places, and have not yet had a problem.

anarcat added a commit to anarcat/pyqrencode that referenced this issue Mar 3, 2023
encoded_scaled apparently fails with:

```
TypeError: integer argument expected, got float
```

in Python 3, and this patch *apparently* fixes that problem.

Fixes: Arachnid#12
@anarcat
Copy link

anarcat commented Mar 3, 2023

honestly? i don't know! :) i just made a patch based on your description, i haven't had the issue myself... i've rerolled it with an extra //

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

Successfully merging a pull request may close this issue.

3 participants