Foreca Weather Plugin
-
- Foreca
- peter.721970
- Thread is marked as Resolved.
-
-
Hello Lululla,
with this ui.py no ui.pyo is built on restart.
-

this work on my box..
last edited 10 minutes ago.NOT VTI IMAGE PLEASE
-
Maybe a VTI/PY2 problem?
-
sorry..
I forgot..
I'll try to prepare for vti, even if I don't use this image
-
Hello Lululla,
thanks for this other version. The ui.pyo is only created when the plugin is started.
However, there is a crash
File “/usr/lib/enigma2/python/Plugins/Extensions/Foreca/plugin.py”, line 12, in main
from .ui import ForecaPreview
File “/usr/lib/enigma2/python/Plugins/Extensions/Foreca/ui.py”, line 34, in <module>
from datetime import datetime, timedelta, timezone
ImportError: cannot import name timezone
(PyObject_CallObject(<bound method ActionMap.action of <Components.ActionMap.ActionMap instance at 0x954e53f0>>,('WizardActions', 'ok')) failed)
Translated with DeepL.com (free version)
-
python --version
??
-
2.7
-
But this is an old version.
The last ui.py worked.
The problem only occurred with the changes in the last py.
Here is the last working version in VTI
-
only test
Python
Display Morecurrent = '' try: # Python 3.x from datetime import timezone current = datetime.datetime.now(tz=timezone(datetime.timedelta(hours=-1))) except ImportError: # Python 2.x: class MyTimezone(datetime.tzinfo): def __init__(self, offset): self.offset = offset def utcoffset(self, dt): return self.offset def tzname(self, dt): return "Custom Timezone" def dst(self, dt): return datetime.timedelta(0) tz_offset = MyTimezone(datetime.timedelta(hours=-1)) current = datetime.datetime.now(tz=tz_offset) print("Current datetime:", current) -
-
Hiho,
ui.py from #395 crashes when calling the plugin.
ui.pyo is created
Python
Display MoreFile "/usr/lib/enigma2/python/Plugins/Extensions/Foreca/plugin.py", line 12, in main from .ui import ForecaPreview File "/usr/lib/enigma2/python/Plugins/Extensions/Foreca/ui.py", line 2712, in <module> class PicSetup(Screen, ConfigListScreen): File "/usr/lib/enigma2/python/Plugins/Extensions/Foreca/ui.py", line 2751, in PicSetup FAlog("Setup...") File "/usr/lib/enigma2/python/Plugins/Extensions/Foreca/ui.py", line 350, in FAlog f.write('{} {} {}\r\n'.format(strftime('%H:%M:%S'), info, wert)) NameError: global name 'strftime' is not defined (PyObject_CallObject(<bound method ActionMap.action of <Components.ActionMap.ActionMap instance at 0x78490b20>>,('WizardActions', 'ok')) failed) ]]>The foreca.log created under /tmp is empty.
-
mistake
strftime is imported
hem in py2 ..
go to py3 my friend :) -
on py2
In Python, the strftime function is not directly imported from the datetime library.try this
-
Hiho,
ui.py from #398 creates ui.pyo when starting the plugin
No crash
Images for air pressure, cloud cover, precipitation, temperature, weather and Eumetsat are sometimes shown and sometimes not.
-
dns on lan??
-
this for you..
-
Thx,
I have to go to bed.
-
Copied the latest changes from git. It seems that you changed and added something, so now the images in Satellite photos do not work except for Eumetsat.
Also, the Foreca logo is not visible. The slideshow on Eumetsat works and I like that option. When I select Continets, Europe, Germany, I get a crashlog. Please, if you can fix it. Thanks.
Copied foreca_logo , keymap and ui.py. (when is changed ui.py ,Restore Eumetsat).
Quote00:09:23.0795 AttributeError: 'NoneType' object has no attribute 'size'
00:09:23.0814 [ePyObject] (PyObject_CallObject(<bound method ActionMap.action of <Components.ActionMap.HelpableActionMap object at 0x6d7f1dd0>>,('ForecaActions', 'green')) failed)
-
try
-
Hello, with modified skin_plugins.mySkin.xml of Metrix skin, you have ForecaPreview screen like this:
-
