-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
Reset LCD gives Error 500 (when reset pin not configured) #771
Comments
What does the daemon log show when this error occurs? The reset pin has nothing to do with the "Reset LCD" button (ironically). Reset LCD merely stops the LCD from flashing (after the flashing function action is activated). What you're likely experiencing is the result of a misconfigured LCD, which should have a traceback in the daemon log. |
Found the problem following your pointer: In case you need it Daemon log: 2020-05-08 09:44:30,849 - ERROR - mycodo.daemon - Could not flash LCD (False): 'NoneType' object has no attribute 'lcd_backlight' This was presumably preventing the reset from working so my OLED was just blank/did not initialise. Combine this with the fact that the first OLED I was trying to use was also faulty. |
That's the issue! Thanks for helping hunt that down. I just pushed a fix for checking for blank lines on that 8-line display. |
Describe the problem/bug
128x64 OLED (SD1306)
Clicking 'reset LCD' when 'Pin: Reset' is not configured gives below error:
Traceback (most recent call last):
File "/home/pi/Mycodo/env/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/Mycodo/env/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/Mycodo/env/lib/python3.7/site-packages/flask_restx/api.py", line 600, in error_router
return original_handler(e)
File "/home/pi/Mycodo/env/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/pi/Mycodo/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/pi/Mycodo/env/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/Mycodo/env/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/pi/Mycodo/env/lib/python3.7/site-packages/flask_login/utils.py", line 261, in decorated_view
return func(*args, **kwargs)
File "/home/pi/Mycodo/mycodo/mycodo_flask/routes_page.py", line 1111, in page_lcd
utils_lcd.lcd_reset_flashing(form_lcd_mod.lcd_id.data)
File "/home/pi/Mycodo/mycodo/mycodo_flask/utils/utils_lcd.py", line 229, in lcd_reset_flashing
return_value, return_msg = control.lcd_flash(lcd_id, False)
TypeError: cannot unpack non-iterable NoneType object
Versions:
Reproducibility
Please list specific setup details that are involved and the steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: