TheWeather Plugin V2.X - PY2 - PY3 - DEB & IPK

There are 349 replies in this Thread which was already clicked 64,265 times. The last Post () by kalkan99.

  • Hi Lululla the new version 2.5 of the plugin in question works correctly on OATV7.3/7.4 but there is a problem,

    compared to version 2.3, with the management of the list of locations added in the "TheWeather.cfg" file,

    only the last 2 locations added are saved / or recognized, the others are deleted.
    I did several tests and added 5/6 locations both with the single name and with the wording "Name-1234567",

    but the problem persists.
    Can you check and solve this problem? Thanks.
    Regards.

    • Official Post

    2.3


    2.4


  • Ok, thanks Lululla, two different codes for ver. 2.3 / and 2.4 / 2.5???
    Anyway, how to solve the problem? Can you explain the solution better?
    Should I replace this code with the current one of 2.5?
    Which code should I replace taken from the 2.3 that works, on 2.5?
    I copy the code part of the working 2.3 so you can select the parts to put in 2.5 to make the list of locations work correctly.
    Or I wait for a repaired file "plugin.py", thanks.
    Regards.



    • Official Post

    you have oeaweather plugin??



    the code doesn't need any changes in my opinion, but you are free to change what you like. if you have oaweather, the program adds or takes from the oaweather plugin config

    • Official Post

    The plugin works. Is it possible to somehow reduce the font of the location selection screen? There are no problems in English, but in Russian the translation does not fit in the line.

    1_0_16_3FA_A_70_1680000_0_0_0_20241110205522.jpg1_0_16_3FA_A_70_1680000_0_0_0_20241110205850.jpg1_0_16_3FA_A_70_1680000_0_0_0_20241110210944.jpg

    Code
            self["list"] = MenuList(self.res, True, eListboxPythonMultiContent)
            if sz_w > 1800:
                self["list"].l.setItemHeight(63)
                self['list'].l.setFont(0, gFont("Regular", 50))
            else:
                self["list"].l.setItemHeight(42)
                self['list'].l.setFont(0, gFont("Regular", 33))
            self["list"].show()

    in class_ of plugin.py ;)

    class localcityscreen(Screen):


    fhd = 50

    hd = 33

  • Hi Lululla , thanks for your answers, as you wrote in the previous post I also have the OA-Wether plugin installed, but that does not have a list of cities but you can insert only one at a time.
    I put the updated "plugin.py" file but it continues to give the same problem.
    I tried to change the FHD / HD values as you suggested in the last post, but nothing from only 2 entries the main and last one written in the cfg file.
    What do you suggest to do?
    Could it be that the two plugins "Oa-Weather" and "The-Weather" conflict?
    Then as I add a city it deletes all the cities saved in the config file and leaves only the last three but only displays two.
    I don't know what could be the bug that creates this problem.

    thanks.

  • you have oeaweather plugin??



    the code doesn't need any changes in my opinion, but you are free to change what you like. if you have oaweather, the program adds or takes from the oaweather plugin config

    I tried to remove all the OA Weather function and put back the original one from The Weather vers. 2.3,

    so now the correct reading of the cfg file works.
    Surely there is something that causes problems with that function with OA Weather when it finds the plugin installed.



    Thanks.



    Original:


    replaced



    This is the "plugin.py" file with the corrections listed above if anyone has problems with the city list.
    PS: the font sizes have also been slightly reduced.


    Edited 3 times, last by casteddus: Solution found ().

  • With Open ATV 7.5 when I push the OK to see the temperature trend the plugin crash:

    Code
    17:38:13.2839   File "/usr/lib/enigma2/python/Plugins/Extensions/TheWeather/plugin.py", line 777, in __init__
    17:38:13.2855     tempdiff = int(round(dataDagen[day+1]["maxtemperature"])-curtemp)
    17:38:13.2860                          ~~~~~~~~~^^^^^^^
    17:38:13.2861 IndexError: list index out of range
    17:38:13.2861 [ePyObject] (PyObject_CallObject(<bound method ActionMap.action of <Components.ActionMap.ActionMap object at 0xa16fcee8>>,('SetupActions', 'ok')) failed)

    Vu+ DUO 4K SE - OpenATV 7.3

    Zgemma H9.2H SE - OpenATV 7.3

  • Caught

    Changed the title of the thread from “TheWeather Plugin V2.1 - PY2 - PY3 - DEB & IPK” to “TheWeather Plugin V2.X - PY2 - PY3 - DEB & IPK”.
    • Official Post

    I hadn't seen this last reply.

    Try this one if you don't have that problem anymore


    recoded

  • I hadn't seen this last reply.

    Try this one if you don't have that problem anymore


    recoded

    Hi Lululla , I installed the latest version you posted (v2.6) I encountered some problems on OATV7.4 and zgemmah9combo decoder;

    The first problem occurs when there is more than one city in the list, it always loads the last city in the list, even if you select another city after exiting the plugin if it reloads it always opens the last city in the list.

    The second problem occurs when you select multiple cities from the list to see different weather info, when you exit the plugin the GUI restarts.


    I fixed this problem by restoring the old string that I had already used in the previous version from my last post >>>>


    But there is still a problem, when there are several cities in the list, and you change the city more than 2 times when you exit the plugin the box restarts the GUI.

    I still haven't figured out the problem, check this and see if you can figure out where the problem is and if you can solve it, thanks.

    So I removed the 2.6 version and went back to my fixed 2.5 version, but noticed that the second problem (GUI restart) still occurs.


    Regards.

    • Official Post

    reboot creates a debug or crash

    attach


    if you select city

    1_0_19_46_200_1D_EEEE02B4_0_0_0_20250109130428.jpg


    select with
    INIT - FAVORITE 1 FAVORITE 2

    this is system.. no have erro my friend



    Only the crash can tell or a debug, it could be the skin.. or a library or a fstring or anything.. They are not in your boxes, always give a debug to check the problem

    • Official Post

    if possible log crash here??

  • With OpenATV 7.5.1 I have crash with the following log:

    21:05:07.4019 File "/usr/lib/enigma2/python/Plugins/Extensions/TheWeather/plugin.py", line 777, in __init__

    21:05:07.4035 if rainamount > 1 and rainamount < 10:

    21:05:07.4040 ^^^^^^^^^^^^^^^^

    21:05:07.4041 IndexError: list index out of range

    21:05:07.4042 [ePyObject] (PyObject_CallObject(<bound method ActionMap.action of <Components.ActionMap.ActionMap object at 0xa13f23d8>>,('SetupActions', 'ok')) failed)


    The plugin starts but not in full color mode and when I push OK to see temperature trend it crashes.

    I do not know why but even if I delete the plugin manually (from \usr\lib\enigma2\python\Plugins\Extensions) it seems to remember the stored locations...

    If I enter in menu I see an empty location and if I delete it that I see the colured pic but than ... crash again


    Now I have deleted all locations and after reboot it crashes immediately:

    Code
    21:18:02.2005   File "/usr/lib/enigma2/python/Plugins/Extensions/TheWeather/plugin.py", line 1252, in main
    21:18:02.2075     if getLocWeer(location):
    21:18:02.2078                   ^^^^^^^^
    21:18:02.2080 UnboundLocalError: cannot access local variable 'location' where it is not associated with a value
    21:18:02.2080 [ePyObject] (PyObject_CallObject(<bound method ActionMap.action of <Components.ActionMap.HelpableActionMap object at 0xa1b08bb8>>,('OkCancelActions', 'ok')) failed)

    Vu+ DUO 4K SE - OpenATV 7.3

    Zgemma H9.2H SE - OpenATV 7.3

    Edited once, last by miazza ().

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!