No data going to Luftdaten when started from cron - ok for manual start from terminal

running the suggested script from the tutorial for adding a cron start works OK
The system starts and the display shows the ID and wifi connected
but no data is being seen at luftdaten

i added a sleep step to cron to ensure that the network was stable and again the envrio starts but nothing seems to be getting to luftdaten

when I run the command from terminal I get this error

pi@raspberrypi:~ $ sudo python /home/pi/enviroplus-python/examples/luftdaten.py
luftdaten.py - Reads temperature, pressure, humidity,
PM2.5, and PM10 from Enviro plus and sends data to Luftdaten,
the citizen science air quality project.

Note: you’ll need to register with Luftdaten at:
https://meine.luftdaten.info/ and enter your Raspberry Pi
serial number that’s displayed on the Enviro plus LCD along
with the other details before the data appears on the
Luftdaten map.

Press Ctrl+C to exit!

Traceback (most recent call last):
*** File “/home/pi/enviroplus-python/examples/luftdaten.py”, line 164, in ***
*** font = ImageFont.truetype(“fonts/Asap/Asap-Bold.ttf”, font_size)***
*** File “/usr/lib/python2.7/dist-packages/PIL/ImageFont.py”, line 280, in truetype***
*** return FreeTypeFont(font, size, index, encoding, layout_engine)***
*** File “/usr/lib/python2.7/dist-packages/PIL/ImageFont.py”, line 145, in init***
*** layout_engine=layout_engine)***
IOError: cannot open resource

The Asap-Bold.ttf font exists in the examples/fonts directory - i looked for it.

rasberry Pi Zero
raspbian buster full
enviroplus with particle sensor

any thoughts or diagnostic tips would be most appreciated

Matt

I had a kind of semi related issue with my pirate radio. Sometimes it wouldn’t stream on boot up. Or switch channels on me. My best guess was my WIFI was slow to connect so it automatically cycled through my playlist looking for a working stream. I went into raspi-config and ticked the box for “wait for network” and problem solved. It takes a bit longer to boot up but it now reliably streams the channel “I had left it on” when I shut it down.

Thanks - good suggestion.

I tried that but it did’t work.

I have a 5 minute @reboot pause in cron which should allow things to settle and I can confirm the network is connected because I can VNC into the unit after boot but before the cron pause lights up the luftdaten script ( shown when the oled booms to life and has the serial number and wifi connected messages)

i am at a loss to diagnose this as I am a newbie with rasbian/linux etc

I’m not any smarter Linux wise. There are some smart people that hang out here, Linux etc smarts anyway, lol. Hopefully one of those see’s your thread.