I made a Python script to scrape a ics file from a trash collection company and post it in domoticz as a text field. It scrapes the ics from inzamelschema.rmn.nl (which will only be usefull for a small group of Dutch people) and stores it on the SD card. If you mannually place a ics file it should not overwrite it but you risk having an outdated version.
So now the catchy part is. I made it on Windows in python3. And it works perfectly there. But if i run it on domoticz it will just give me this:
pi@domoticz:~/domoticz/scripts/python$ python3 afvalkalender.py
Traceback (most recent call last):
File "afvalkalender.py", line 171, in <module>
ics_result = read_ics('/var/tmp/inzamelschema.ics')
File "afvalkalender.py", line 91, in read_ics
icscal = Calendar.from_ical(ics.read())
File "/home/pi/.local/lib/python3.4/site-packages/icalendar/cal.py", line 401, in from_ical
'{st!r}'.format(**locals()))
ValueError: Found no components where exactly one is required: b''
I cant seem to google my way out of this so does anyone know what im doing wrong. I've added the script to it as a txt. Plz dont hate on it too much. My experience in pyhton is limited by being able to google it
