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

AttributeError: 'NoneType' object has no attribute 'format': y-coordinate: {0} above maximum of {1}. #4

Closed
synox opened this issue Jun 2, 2017 · 1 comment

Comments

@synox
Copy link
Contributor

synox commented Jun 2, 2017

st7565.Glcd#is_off_grid has an error in the error handling. it raises an error if it prints off screen.

the print function is implemented incorrectly (call format() on the string, not on the result of print).

error:

	y-coordinate: {0} above maximum of {1}.
	Traceback (most recent call last):
	  File "/scratch.py", line 30, in <module>
	    is_off_grid(100, 50, 10, 50)
	  File "/scratch.py", line 26, in is_off_grid
	    print('y-coordinate: {0} above maximum of {1}.').format(ymax, LCD_HEIGHT - 1)
	AttributeError: 'NoneType' object has no attribute 'format'
@rdagger
Copy link
Owner

rdagger commented Jun 10, 2017

Thanks.

@rdagger rdagger closed this as completed Jun 10, 2017
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

2 participants