Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £99! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £149! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[VU+ Duo4K SE] EPGExport plugin error due to Python update in OpenVIX

nighteagleowl

Forum Supporter
Donated Member
Joined
Mar 27, 2025
Messages
13
Reaction score
2
Points
3
In latest OpenVIX release (6.7.007) python was updated to 3.12 if I am not mistaken.

And as a result a lot of UTC related date-time routines are not supported anymore (see deprecated in https://docs.python.org/3/library/datetime.html#datetime.timedelta ) thus plugins like EPGExport dumps on lines like:

offset = datetime.fromtimestamp(ts) - datetime.utcfromtimestamp(ts)

because datetime.utcfromtimestamp(ts) has to be replaced with datetime.fromtimestamp(ts, tz=timezone.utc) and from datetime import timezone
...Or even better (though one need to check + or - for east/west of Greenwich, UTC):

offset = datetime.now().astimezone().utcoffset().total_seconds()

I tried to update EPGExport myself but can't find proper PLUGIN.PY for it. One on github is somewhat old and buggy and need more changes.

Could someone help please!? or maybe point me to proper py sources OpenVIX is using for EPGExport plugin.

I think other old plugins can face the same issue with UTC.

PS. I am not a developer really.
 
Ok, thank for the code. So after some more checks --- latest version 1.5-r6 dumps on line 802 (see screen attached below, a bit small, sorry - it's my phone) because datetime.fromtimestamp(ts) is naive i.e. w/o timestamp and you can't subtract naïve and timezone-aware one in Python 3.12 anymore. You can easily check that in any online python compiler giving it both parts of the line.
The fix which I done and it works for me fine is to replace line 802:

offset = datetime.fromtimestamp(ts) - datetime.fromtimestamp(ts, tz=timezone.utc)

with

offset = datetime.fromtimestamp(ts).astimezone() - datetime.fromtimestamp(ts, tz=timezone.utc)

which basically adds "+00:00" (for UK) to the first term and it works. Probably some other ways will work too e.g. offset = datetime.now().astimezone().utcoffset()

802_dump.webp
 
Ok, thank for the code. So after some more checks --- latest version 1.5-r6 dumps on line 802 (see screen attached below, a bit small, sorry - it's my phone) because datetime.fromtimestamp(ts) is naive i.e. w/o timestamp and you can't subtract naïve and timezone-aware one in Python 3.12 anymore. You can easily check that in any online python compiler giving it both parts of the line.
The fix which I done and it works for me fine is to replace line 802:

offset = datetime.fromtimestamp(ts) - datetime.fromtimestamp(ts, tz=timezone.utc)

with

offset = datetime.fromtimestamp(ts).astimezone() - datetime.fromtimestamp(ts, tz=timezone.utc)

which basically adds "+00:00" (for UK) to the first term and it works. Probably some other ways will work too e.g. offset = datetime.now().astimezone().utcoffset()

View attachment 67356
OK, so.post findings as a comment on that GitHub member and then hopefully Mr Servo will fix it.
 
So plugin has been updated….
from Servo….. DONE! Thanks to you for reporting and @nighteagleowl for detailed information!
 
Hm.... Mr.Servo updated it anew 2 hours ago and I think the bug was re-introduced in a different form. Now the line to calculate off-set is like this (line 802):

offset = datetime.fromtimestamp(ts, tz=timezone.utc) - datetime.fromtimestamp(ts, tz=timezone.utc)

But obviously (one can simply search for it) both terms are identical and difference, offset is always 0, right ?!
I am unsure but i guess he was thinking to do this i.e. use TL inside first term:

offset = datetime.fromtimestamp(tl, tz=timezone.utc) - datetime.fromtimestamp(ts, tz=timezone.utc)

...but he didn't. So there is still a bug :-(
 

OpenViX Feeds Status

Back
Top