Re: Setup/Software Update leads to crash/hang #41
Re: Setup/Software Update leads to crash/hang #42
Posted 28 December 2023 - 09:17
I am not sure that is is the good topic, but i have some troubles on DUO4K and a friend DUO4K SE.
After, a reboot there is a black screen and the the solution is to disconnect the power. Switch on and off, is not enought.
It is not all the time.
It happends on openpli 8.3 and openpli 9 (last releases)
Re: Setup/Software Update leads to crash/hang #43
Posted 28 December 2023 - 11:27
Here I get a timestamp.
Not.
[UpdatePlugin] Trying to fetch time from http://downloads.openpli.org/feeds/openpli-develop/gbquad4k [UpdatePlugin] Error in get timestamp an integer is required (got type str) [UpdatePlugin] Trying to fetch time from http://downloads.openpli.org/feeds/openpli-develop/cortexa15hf-neon-vfpv4 [UpdatePlugin] Error in get timestamp an integer is required (got type str) [UpdatePlugin] Trying to fetch time from http://downloads.openpli.org/feeds/openpli-develop/all [UpdatePlugin] Error in get timestamp an integer is required (got type str)
Need this
If telnet python work:
>>> modified = datetime.strptime(urlopen("%s/Packages.gz" % url, timeout=1).info().get('Last-Modified'), '%a, %d %b %Y %H:%M:%S GMT') >>> strftime("%Y-%m-%d %H:%M:%S", gmtime(datetime.timestamp(modified) - altzone)) '2023-12-27 20:57:28'
byt SoftwareUpdate.py not work
try: print('[UpdatePlugin] Trying to fetch time from %s' % url) modified = datetime.strptime(urlopen("%s/Packages.gz" % url, timeout=1).info().get('Last-Modified'), '%a, %d %b %Y %H:%M:%S GMT') return strftime("%Y-%m-%d %H:%M:%S", gmtime(datetime.timestamp(modified) - altzone)) except Exception as er: print('[UpdatePlugin] Error in get timestamp', er)
[UpdatePlugin] Trying to fetch time from http://downloads.openpli.org/feeds/openpli-develop/gbquad4k [UpdatePlugin] Error in get timestamp time data 'Wed, 27 Dec 2023 19:26:56 GMT' does not match format '%a, %d %b %Y %H:%M:%S GMT' [UpdatePlugin] Trying to fetch time from http://downloads.openpli.org/feeds/openpli-develop/cortexa15hf-neon-vfpv4 [UpdatePlugin] Error in get timestamp time data 'Wed, 27 Dec 2023 19:57:35 GMT' does not match format '%a, %d %b %Y %H:%M:%S GMT' [UpdatePlugin] Trying to fetch time from http://downloads.openpli.org/feeds/openpli-develop/all [UpdatePlugin] Error in get timestamp time data 'Wed, 27 Dec 2023 19:57:28 GMT' does not match format '%a, %d %b %Y %H:%M:%S GMT'
GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K
Re: Setup/Software Update leads to crash/hang #44
Re: Setup/Software Update leads to crash/hang #45
Posted 28 December 2023 - 17:45
Chances are this is a problem with complex oneliners and lack of return value checking again.
Split the line into its pieces and do proper retuvn value checking. For example, you could get that because of the 1 second timeout,.in which case info() doesn't return any headers.
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: Setup/Software Update leads to crash/hang #46
Posted 28 December 2023 - 19:01
At the last commit I get a value with the date which I tripple checked and it was a string with the expected format. So no idea why it fails. The example above does not look like my code.
Edited by littlesat, 28 December 2023 - 19:33.
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Re: Setup/Software Update leads to crash/hang #47
Posted 29 December 2023 - 10:43
def getLatestImageTimestamp(self): def gettime(url): try: print('[UpdatePlugin] Trying to fetch time from %s' % url) #return strftime("%Y-%m-%d %H:%M:%S", gmtime(timegm(urlopen("%s/Packages.gz" % url, timeout=1).info().get('Last-Modified')) - altzone)) data = urlopen("%s/Packages.gz" % url, timeout=3).info().get('Last-Modified') print(data) time_gm = timegm(data) return strftime("%Y-%m-%d %H:%M:%S", gmtime(time_gm - altzone)) except Exception as er: print('[UpdatePlugin] Error in get timestamp', er) return "" return sorted([gettime(open("/etc/opkg/%s" % file, "r").readlines()[0].split()[2]) for file in listdir("/etc/opkg") if not file.startswith("3rd-party") and file not in ("arch.conf", "opkg.conf", "picons-feed.conf")], reverse=True)[0]
RU locale
[UpdatePlugin] Trying to fetch time from http://downloads.openpli.org/feeds/openpli-develop/gbquad4k Thu, 28 Dec 2023 22:53:38 GMT [UpdatePlugin] Error in get timestamp an integer is required (got type str) [UpdatePlugin] Trying to fetch time from http://downloads.openpli.org/feeds/openpli-develop/cortexa15hf-neon-vfpv4 Thu, 28 Dec 2023 23:24:24 GMT [UpdatePlugin] Error in get timestamp an integer is required (got type str) [UpdatePlugin] Trying to fetch time from http://downloads.openpli.org/feeds/openpli-develop/all Thu, 28 Dec 2023 23:24:12 GMT [UpdatePlugin] Error in get timestamp an integer is required (got type str)
GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K
Re: Setup/Software Update leads to crash/hang #48
Posted 29 December 2023 - 11:46
There is something extreme strange playing here... when I try this via console it is working fine, But when I do the same in enigma2 then it tells me the string is not in line with the format.
from datetime import datetime from urllib.request import urlopen url = 'http://downloads.openpli.org/feeds/openpli-develop/all' time = urlopen("%s/Packages.gz" % url, timeout=1).info().get('Last-Modified') print(time) out = datetime.strptime(time , '%a, %d %b %Y %H:%M:%S GMT') print(out)
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Re: Setup/Software Update leads to crash/hang #49
Posted 29 December 2023 - 11:48
def gettime(url): try: print('[UpdatePlugin] Trying to fetch time from %s' % url) time = urlopen("%s/Packages.gz" % url, timeout=1).info().get('Last-Modified') #time = "Maa, 24 Jan 2024 10:10:23 GMT" print(' > ', time) out = datetime.strptime(time , '%a, %d %b %Y %H:%M:%S GMT') print(' > ', time) time = gmtime(time - altzone) print(' > ', time) time = strftime("%Y-%m-%d %H:%M:%S", time) print(' > ', time) return time except Exception as er: print('[UpdatePlugin] Error in get timestamp', er) return "" print(' > ', sorted([gettime(open("/etc/opkg/%s" % file, "r").readlines()[0].split()[2]) for file in listdir("/etc/opkg") if not file.startswith("3rd-party") and file not in ("arch.conf", "opkg.conf", "picons-feed.conf")], reverse=True)) return sorted([gettime(open("/etc/opkg/%s" % file, "r").readlines()[0].split()[2]) for file in listdir("/etc/opkg") if not file.startswith("3rd-party") and file not in ("arch.conf", "opkg.conf", "picons-feed.conf")], reverse=True)[0]
Edited by littlesat, 29 December 2023 - 11:49.
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Re: Setup/Software Update leads to crash/hang #50
Posted 29 December 2023 - 11:55
There is something extreme strange playing here... when I try this via console it is working fine, But when I do the same in enigma2 then it tells me the string is not in line with the format.
Same problem here https://forums.openp...dpost&p=1593772
Maybe problem in locale?
GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K
Re: Setup/Software Update leads to crash/hang #51
Re: Setup/Software Update leads to crash/hang #52
Re: Setup/Software Update leads to crash/hang #53
Posted 29 December 2023 - 15:23
We miss the getdate() now that was not language depended!!! Issue found, but no solution yet.
solution,but output only english,e.g. "Maa, 24 Jan 2024 10:10:23 GMT"
return urlopen("%s/Packages.gz" % url, timeout=2).info().get('Last-Modified')
GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K
Re: Setup/Software Update leads to crash/hang #54
Re: Setup/Software Update leads to crash/hang #55
Posted 29 December 2023 - 17:05
I'm afraid indeed the translations are involved here.... The 'website' is in English...
The HTTP standard describes timestamps in a response header in that format (RFC 822 / RFC 1123). Not related to "the website" as such.
If you are using datetime, which is locale aware, you can switch to en_US before parsing the timestamp:
locale.setlocale(locale.LC_TIME, 'en_US')
but it is suggested not to do that, as it is not thread safe (it also changes the locale in running threads).
It is better to use
>>> from email.utils import parsedate_to_datetime >>> x = "Mon, 24 Jan 2024 10:10:23 GMT" >>> parsedate_to_datetime(x) datetime.datetime(2024, 1, 24, 10, 10, 23, tzinfo=datetime.timezone.utc) >>> int(parsedate_to_datetime(x).timestamp()) 1706091023
and continue from there.
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: Setup/Software Update leads to crash/hang #56
Posted 29 December 2023 - 17:54
def getLatestImageTimestamp(self): def gettime(url): try: print('[UpdatePlugin] Trying to fetch time from %s' % url) from locale import setlocale locale.setlocale(locale.LC_TIME, 'en_US') modified = datetime.strptime(urlopen("%s/Packages.gz" % url, timeout=2).info().get('Last-Modified'), '%a, %d %b %Y %H:%M:%S GMT') return strftime("%Y-%m-%d %H:%M:%S", gmtime(datetime.timestamp(modified) - altzone)) except Exception as er: print('[UpdatePlugin] Error in get timestamp', er) return "" return sorted([gettime(open("/etc/opkg/%s" % file, "r").readlines()[0].split()[2]) for file in listdir("/etc/opkg") if not file.startswith("3rd-party") and file not in ("arch.conf", "opkg.conf", "picons-feed.conf")], reverse=True)[0]
Edited by Dimitrij, 29 December 2023 - 17:55.
GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K
Re: Setup/Software Update leads to crash/hang #57
Posted 29 December 2023 - 19:37
Two issues with this:
- you shouldn't use setlocale as it is not thread-safe
- you've now changed the locale on your box to US English permanently
Instead, use
def getLatestImageTimestamp(self): def gettime(url): try: print('[UpdatePlugin] Trying to fetch time from %s' % url) from email.utils import parsedate_to_datetime modified = int(parsedate_to_datetime(urlopen("%s/Packages.gz" % url, timeout=2).info().get('Last-Modified')).timestamp()) return strftime("%Y-%m-%d %H:%M:%S", gmtime(modified - altzone)) except Exception as er: print('[UpdatePlugin] Error in get timestamp', er) return "" return sorted([gettime(open("/etc/opkg/%s" % file, "r").readlines()[0].split()[2]) for file in listdir("/etc/opkg") if not file.startswith("3rd-party") and file not in ("arch.conf", "opkg.conf", "picons-feed.conf")], reverse=True)[0]
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: Setup/Software Update leads to crash/hang #58
Posted 29 December 2023 - 19:46
locale.setlocale(locale.LC_TIME, 'en_US') does not work.... locale.setlocale(locale.LC_TIME, 'en_EN.utf8') does work... I just push something.... As far I can see this is working... But I do not like it at all... as it is indeed not thread safe... but I set the language back.
Since getdate(...) is not there anymore in urllib I do not find a real solution to get this done.... So I tried to resolve it but I also have to sleep on it.
Google wasn't also not helpfull...
Edited by littlesat, 29 December 2023 - 19:47.
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Re: Setup/Software Update leads to crash/hang #59
Posted 29 December 2023 - 19:50
On the box en_US works, "en_EN.utf8" looks like a PC distro.
But I suggest you take what I posted instead, as it has no locale issues.
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: Setup/Software Update leads to crash/hang #60
Also tagged with one or more of these keywords: Solo2
VuSolo2 Flash bricht abStarted by snake.bite, 25 Aug 2024 vu+, solo2, flash, image |
|
|||
No data on transponder! (Timeout reading PAT) [Solo2]Started by VeryClear, 3 Jul 2024 solo2 |
|
|||
Solo2 img v6.2 20181231 was not found on this serverStarted by Odyssey, 2 Jan 2019 Solo2 |
|
|||
Vu+ Solo2 crasht continu na upgrade van vandaagStarted by pst, 31 May 2018 vu+, solo2, crash, epg and 1 more... |
|
|||
OpenOpera VU+ Solo2Started by dandjo, 27 Nov 2016 OpenOpera, Solo2, hbbtv |
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users