PDA

View Full Version : [ViX_Misc] Weather plugin time format error



Orlandox
21-01-21, 13:35
Hello, can this be fixed ? 61293

ronand
21-01-21, 14:19
You would have to contact the plugin author (no idea who it is) to get it fixed. I just checked it on my H7S and it worked fine so it may be a problem with the skin you are using.

Orlandox
21-01-21, 15:09
I have tried several skins and the error stays. When testing with OpenMultiboot and OpenATV it works, so it must have something to do with OpenViX itself.

ccs
21-01-21, 15:17
@ronand - which skin works for you?

adm
21-01-21, 15:40
@ronand - which skin works for you?

works for me Xtrend 10k, Vix 5.4.004, vix-night-HD (1280x720) skin - and seems to work whatever the time setting (menu -> setup -> time -> time style)

61294

Orlandox
21-01-21, 16:08
It has something to do with the language selection. When I select User Interface -> Language from Suomi (Finland) to English (UK) it works. Maybe some developer can check it ?61295

Orlandox
21-01-21, 16:48
I think the problem is in this file : \Root\usr\lib\locale\fi_FI\LC_TIME, there is time format %H.%M.%S and in \Root\usr\lib\locale\en_GB\LC_TIME it is %H:%M:%S. How I can edit that file to test ?

ccs
21-01-21, 16:59
.... it's a binary file, I doubt that you can edit it easily.

Those files haven't changed for over 3 years, they'll probably be part of the image build process.

And who knows what might stop working if you did make the change?

ccs
21-01-21, 17:56
works for me Xtrend 10k, Vix 5.4.004, vix-night-HD (1280x720) skin - and seems to work whatever the time setting (menu -> setup -> time -> time style)

Took a while for me to work out that the time style option doesn't show in the simple_1080 skin. :)

adm
21-01-21, 18:43
I think the problem is in this file : \Root\usr\lib\locale\fi_FI\LC_TIME, there is time format %H.%M.%S and in \Root\usr\lib\locale\en_GB\LC_TIME it is %H:%M:%S. How I can edit that file to test ?

I’m not sure that this is the cause as I’ve just changed all the colons in the English/GB and English/English versions with full stops, uploaded the file to my box and have rebooted the box. My version of the Weather plug-in still works without shown a time error message.

However you may want to try with the Finnish file.

Download and install a hex editor such HxD HEX Editor

https://mh-nexus.de/en/hxd/

MAKE A BACKUP OF THE LC_time file

In Hxd Hex Editor open the LC_time file

From the top menu bar select search
In the search window that appears select the “Hex-values” tab
Search for “2E” (2E = . and 3A = :)
Replace the appropriate 2E with 3A and save the file

You can manually highlight 2E and type 3A or you can use the search/replace menu item.

One window will show the Hex (binary) code AND an ASCII translation which you can identify H:M:S etc.

61298

adm
21-01-21, 20:58
Search for “2E” (2E = . and 3A = :)



That should read
2E = a full stop
3A = a colon

Joe_90
21-01-21, 21:38
The closing bracket turned it into a smiley! Like this :)
Code tags would have resolved the issue ;)


(colon =:)

Orlandox
22-01-21, 12:15
Hello, I made a test by copying LC_TIME file from \Root\usr\lib\locale\en_GB\ to \Root\usr\lib\locale\fi_FI\, but same time format error. So localization is done somewhere else or the error is caused by plugin itself. I give up...

ccs
22-01-21, 12:28
... did you reboot the box after making the change?

adm
22-01-21, 12:46
... did you reboot the box after making the change?

I did a few test with replacing the colon in the H:M:S fields with full stops and rebooting after uploading the changed file. It made no difference to my working weather plugin - it still worked indicating the difference in the LC_time files for each language is probably not the cause of the problem.

Orlandox
28-02-21, 17:28
I managed to get it working by changing some code: \Root\usr\lib\enigma2\python\Plugins\Extensions\We atherPlugin\plugin.pyo --> "%H:%M:%S" to "%H.%M.%S" and "%H:%M",c to "%H.%M",c. Also \Root\usr\lib\enigma2\python\Components\Sources\MS NWeather.pyo --> "%H:%M:%S" to "%H.%M.%S" and "%H:%M",c to "%H.%M",c.

Maybe someone can change the source code by adding OR sentence, for example "%H:%M:%S" OR "%H.%M.%S" Is that possible ?

ccs
28-02-21, 17:34
The source is here....


https://github.com/oe-alliance/enigma2-plugins/tree/master/weatherplugin

In theory, all you need to do is edit the plugin.py source file, put it into /usr/lib/enigma2/python/Plugins/Extensions/weatherplugin/ and reboot the gui.

Rename the original plugin.pyo file to plugin.pyo.orig in case the new version fails.

Orlandox
28-02-21, 17:44
MSNWeather.pyo must be edited too to have observationtime working in Skin, otherwise you get n/a -error.

ccs
28-02-21, 17:45
MSNWeather.pyo must be edited too to have observationtime working in Skin, otherwise you get n/a -error.

The source file will be in MSNWeather.py