On 07/12/2019 17:48, RobH wrote: > I am trying to do this project on a pi zero: > > http://frederickvandenbosch.be/?p=1365 > > After overcoming a few errors, I now have the display working and the > start of the code showing on the display, that being the time. > > It doesn't move on to the next part of the code ie, no rectangle drawn > def display_time(): > # Collect current time and date > if(time_format): > current_time = time.strftime("%I:%M")<<< stays at this line > else: > current_time = time.strftime("%H:%M") > > current_date = time.strftime("%d/%m/%Y") > > # Clear image buffer by drawing a black filled box > draw.rectangle((0,0,width,height), outline=0, fill=0 > > In the original code you can see that the author used the > Minecraftia.ttf font, but I had to download the Minecraftia-Regular.ttf > font. The link the author gave took me to that. > > The Minecraft-Regular.ttf font produced errors when the code was run, > saying at the end of the error that it cannot open resource. > > I then used the NotoSerif-Regular.ttf font which let the code start > without error, but as above it is stuck at the time.
One thing you certainly need to do is add a closing brace to the last line. Duncan -- https://mail.python.org/mailman/listinfo/python-list