DEV Community

Discussion on: Aw, snap - refresh web app in Chromium kiosk mode after it breaks

Collapse
 
flavio_frontini_9b6718c36 profile image
Flavio Frontini

Hello, its really what i was looking for. Unfortunately i am not able to make it working on my Pi Zero. I get:
File "./evalimage.py", line 19
if get_main_color('screen.png') != (0, 0, 0):
^
IndentationError: expected an indented block

Do you have an idea of why?
Thank you!

Collapse
 
linehammer profile image
linehammer

Putting in an extra space or leaving one out where it is needed will surely generate an error message . I'd suggest using only tabs or only spaces for indentation. Using only spaces is generally the easier choice. Most editors have an option for automatically converting tabs to spaces. If your editor has this option, turn it on. Some common causes of this error include:

Forgetting to indent the statements within a compound statement
Forgetting to indent the statements of a user-defined function.

The error message IndentationError: expected an indented block would seem to indicate that you have an indentation error. It is probably caused by a mix of tabs and spaces . The indentation can be any consistent white space . It is recommended to use 4 spaces for indentation in Python, tabulation or a different number of spaces may work, but it is also known to cause trouble at times. Tabs are a bad idea because they may create different amount if spacing in different editors .

net-informations.com/python/err/in...