Skip to content

python3 compatibility#1

Merged
rwb27 merged 1 commit intorwb27:lens-shadingfrom
codeTom:lens-shading
Jul 5, 2018
Merged

python3 compatibility#1
rwb27 merged 1 commit intorwb27:lens-shadingfrom
codeTom:lens-shading

Conversation

@rwb27
Copy link
Copy Markdown
Owner

@rwb27 rwb27 commented Jul 5, 2018

several python3 related fixes:
ctype char * now requries bytes (was string)
some calculations now seem to need int()

several python3 related fixes:
ctype char * now requries bytes (was string)
some calculations now seem to need int()
@rwb27
Copy link
Copy Markdown
Owner Author

rwb27 commented Jul 5, 2018

I don't quite understand why the calculations need int(), as I don't think that's my code and I'm fairly sure it worked on Python 3 before... However I can't see that int() will do any harm, so may as well leave it in there.

@rwb27 rwb27 merged commit 5491b01 into rwb27:lens-shading Jul 5, 2018
@codeTom
Copy link
Copy Markdown

codeTom commented Jul 5, 2018

I don't know why either but it complained that indices must be integers and that (float & int) is not a valid expression without them.

@rwb27
Copy link
Copy Markdown
Owner Author

rwb27 commented Jul 6, 2018

Fair enough! I wonder if perhaps the cause of the error is elsewhere, perhaps I've done a / rather than a // somewhere else in the code I added, and I didn't notice because I only tested in Python 2. If I get time I might test the upstream picamera module and see if it has the same issue.

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 this pull request may close these issues.

2 participants