Paste #271476

   
pasted on 29.11.2023 20:44
  • Edit to this paste
  • Print
  • Raw
  • Compare with paste
    #  
  • Toggle line numbers
  • Syntax highlighting  
Text paste
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
2023-11-29 20:38:05.119 T:161932   DEBUG <general>: weather.gismeteo [v.0.6.3+matrix.1]: <Weather ['/home/johndoe/.kodi/addons/weather.gismeteo/default.py', '1']>
2023-11-29 20:38:05.119 T:161932   DEBUG <general>: weather.gismeteo [v.0.6.3+matrix.1]: Actions: ['root', 'location']
2023-11-29 20:38:05.119 T:161932   DEBUG <general>: weather.gismeteo [v.0.6.3+matrix.1]: Called action root with params <Params {'id': '1'}>
2023-11-29 20:38:05.119 T:161932   DEBUG <general>: weather.gismeteo [v.0.6.3+matrix.1]: Cache miss: _ip_locations('ru',){}
2023-11-29 20:38:05.308 T:161932   DEBUG <general>: weather.gismeteo [v.0.6.3+matrix.1]: Request info
                                                   Method: GET
                                                   URL: https://services.gismeteo.net/inform-service/inf_chrome/cities/?mode=ip&count=1&nocache=1&lang=ru
                                                   Headers: {'User-Agent': 'KodifromDebian/19.4 (X11; Linux x86_64) Kodi_Fork_Kodi from Debian/1.0 Ubuntu/22.04 App_Bitness/64 Version/19.4-Debian-package-version:-2:19.4+dfsg1-2', 'Accept-Encoding': 'gzip, deflate, br', 'Accept': '*/*', 'Connection': 'keep-alive'}
                                                   Response info
                                                   Status code: 200
                                                   Reason: OK
                                                   Elapsed: 0.1827 sec
                                                   URL: https://services.gismeteo.net/inform-service/inf_chrome/cities/?mode=ip&count=1&nocache=1&lang=ru
                                                   Headers: {'Date': 'Wed, 29 Nov 2023 17:38:05 GMT', 'Content-Type': 'text/xml; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding, Accept-Encoding', 'X-Gismeteo-Timestamp': '1701279485', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE, PATCH, OPTIONS', 'Access-Control-Allow-Headers': 'DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization', 'Access-Control-Max-Age': '1728000', 'X-Gismeteo-TimestampStr': '2023/11/29 17:38:05', 'Access-Control-Expose-Headers': 'X-Gismeteo-TimestampStr, X-Gismeteo-Timestamp', 'x-gm-ver': '3', 'Server': 'gis', 'X-DC': 'nord.ngx-services-nord01', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Content-Encoding': 'gzip'}
                                                   Content: <document><item id="4392" lat="54.19" lng="37.62" tzone="180" n="Тула" country_id="156" country_name="Россия" district_id="260" district_name="Тульская область, Тула (городской округ)" kind="M"></item></document>
2023-11-29 20:38:06.310 T:161932   DEBUG <general>: weather.gismeteo [v.0.6.3+matrix.1]: Cache miss: _location_forecast('ru', '4392'){}
2023-11-29 20:38:07.074 T:161932   DEBUG <general>: weather.gismeteo [v.0.6.3+matrix.1]: Request info
                                                   Method: GET
                                                   URL: https://services.gismeteo.net/inform-service/inf_chrome/forecast/?city=4392&lang=ru
                                                   Headers: {'User-Agent': 'KodifromDebian/19.4 (X11; Linux x86_64) Kodi_Fork_Kodi from Debian/1.0 Ubuntu/22.04 App_Bitness/64 Version/19.4-Debian-package-version:-2:19.4+dfsg1-2', 'Accept-Encoding': 'gzip, deflate, br', 'Accept': '*/*', 'Connection': 'keep-alive'}
                                                   Response info
                                                   Status code: 200
                                                   Reason: OK
                                                   Elapsed: 0.7623 sec
                                                   URL: https://services.gismeteo.net/inform-service/inf_chrome/forecast/?city=4392&lang=ru
                                                   Headers: {'Date': 'Wed, 29 Nov 2023 17:38:07 GMT', 'Content-Type': 'text/xml; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding, Accept-Encoding', 'X-Gismeteo-Timestamp': '1701279487', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE, PATCH, OPTIONS', 'Access-Control-Allow-Headers': 'DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization', 'Access-Control-Max-Age': '1728000', 'X-Gismeteo-TimestampStr': '2023/11/29 17:38:07', 'Access-Control-Expose-Headers': 'X-Gismeteo-TimestampStr, X-Gismeteo-Timestamp', 'x-gm-ver': '3', 'Server': 'gis', 'X-DC': 'nord.ngx-services-nord02', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Content-Encoding': 'gzip'}
                                                   Content: <weather><location id="4392" name="Тула" name_r="в Туле" country_id="156" country_name="Россия" district_id="260" district_name="Тульская область" kind="M" lat="54.19" lng="37.62" tzone="180" cur_time="2023-11-29T17:38:07" nowcast_url="/nowcast-tula-4392/" nowcast_teaser="true"><fact valid="2023-11-29T18:00:00" tod="4" risem="502" setm="972" durm="514" sunrise="1701246134" sunset="1701274359"><values t="-1" tflt="-0.7" tcflt="-5.3" p="741" ws="4" wd="3" hum="92" hi="-5" cl="3" pt="2" pr="1" prflt="0.49000000953674316" ts="0" water_t="3" icon="c4.s1" descr="Пасмурно, небольшой снег" grade="0"></values></fact><day date="2023-11-29" risem="502" setm="972" durm="514" sunrise="1701246134" sunset="1701274359" tmin="-8" tmax="-1" pmin="738" pmax="746" wsmin="1" wsmax="5" hummin="74" hummax="94" cl="2" pt="3" pr="1" ts="0" icon="d.c3.rs1" descr="Облачно, небольшой мокрый снег" ws="5" wd="5" hum="85" grademax="4" prflt="2" gust_speed="13"><forecast valid="2023-11-29T00:00:00" tod="1"><values t="-6" p="745" ws="3" wd="5" hum="74" hi="-10" cl="3" pt="0" pr="0" ts="0" icon="c4" descr="Пасмурно, без осадков" grade="2"></values></forecast><forecast valid="2023-11-29T03:00:00" tod="1"><values t="-8" p="746" ws="2" wd="4" hum="80" hi="-11" cl="0" pt="0" pr="0" ts="0" icon="n" descr="Ясно" grade="2"></values></forecast><forecast valid="2023-11-29T06:00:00" tod="2"><values t="-8" p="746" ws="1" wd="3" hum="84" hi="-8" cl="1" pt="0" pr="0" ts="0" icon="n.c2" descr="Малооблачно, без осадков" grade="1"></values></forecast><forecast valid="2023-11-29T09:00:00" tod="2"><values t="-6" p="745" ws="3" wd="3" hum="83" hi="-10" cl="3" pt="2" pr="1" ts="0" icon="c4.s1" descr="Пасмурно, небольшой снег" grade="2"></values></forecast><forecast valid="2023-11-29T12:00:00" tod="3"><values t="-2" p="744" ws="3" wd="3" hum="80" hi="-6" cl="2" pt="2" pr="0" ts="0" icon="d.c3" descr="Облачно, без осадков" grade="2" gust_speed="8"></values></forecast><forecast valid="2023-11-29T15:00:00" tod="3"><values t="-2" p="743" ws="4" wd="3" hum="93" hi="-5" cl="3" pt="2" pr="1" prflt="0.1" ts="0" icon="c4.s1" descr="Пасмурно, небольшой снег" grade="2" gust_speed="11"></values></forecast><forecast valid="2023-11-29T18:00:00" tod="4"><values t="-1" p="741" ws="4" wd="3" hum="92" hi="-5" cl="3" pt="3" pr="1" prflt="0.3" ts="0" icon="c4.rs1" descr="Пасмурно, небольшие осадки" grade="4" gust_speed="11"></values></forecast><forecast valid="2023-11-29T21:00:00" tod="4"><values t="-1" p="738" ws="5" wd="3" hum="94" hi="-6" cl="3" pt="3" pr="2" prflt="1.5" ts="0" icon="c4.rs2" descr="Пасмурно, мокрый снег" grade="5" gust_speed="13"></values></forecast></day><day date="2023-11-30" risem="503" setm="971" durm="514" sunrise="1701332630" sunset="1701360707" tmin="-4" tmax="1" pmin="736" pmax="742" wsmin="1" wsmax="5" hummin="79" hummax="94" cl="3" pt="3" pr="2" ts="0" icon="c4.rs2" descr="Пасмурно, снег с дождём" ws="5" wd="6" hum="85" grademax="5" prflt="5" gust_speed="13"><forecast valid="2023-11-30T00:00:00" tod="1"><values t="0" p="736" ws="5" wd="3" hum="92" hi="-4" cl="3" pt="3" pr="2" prflt="2.1" ts="0" icon="c4.rs2" descr="Пасмурно, мокрый снег" grade="5" gust_speed="13"></values></forecast><forecast valid="2023-11-30T03:00:00" tod="1"><values t="1" p="736" ws="3" wd="4" hum="94" hi="-1" cl="3" pt="3" pr="2" prflt="1.4" ts="0" icon="c4.rs2" descr="Пасмурно, снег с дождём" grade="4" gust_speed="11"></values></forecast><forecast valid="2023-11-30T06:00:00" tod="2"><values t="1" p="737" ws="1" wd="5" hum="88" hi="1" cl="3" pt="3" pr="1" prflt="0.5" ts="0" icon="c4.rs1" descr="Пасмурно, небольшой снег с дождём" grade="4" gust_speed="7"></values></forecast><forecast valid="2023-11-30T09:00:00" tod="2"><values t="-1" p="738" ws="3" wd="5" hum="80" hi="-5" cl="2" pt="3" pr="1" prflt="0.4" ts="0" icon="d.c3.rs1" descr="Облачно, небольшой снег с дождём" grade="3" gust_speed="8"></values></forecast><forecast valid="2023-11-30T12:00:00" tod="3"><values t="-3" p="739" ws="4" wd="5" hum="79" hi="-7" cl="2" pt="3" pr="1" prflt="0.1" ts="0" icon="d.c3.rs1" descr="Облачно, небольшой мокрый снег" grade="3" gust_speed="9"></values></forecast><forecast valid="2023-11-30T15:00:00" tod="3"><values t="-3" p="740" ws="3" wd="5" hum="81" hi="-7" cl="2" pt="3" pr="1" prflt="0.3" ts="0" icon="d.c3.rs1" descr="Облачно, небольшой мокрый снег" grade="3" gust_speed="9"></values></forecast><forecast valid="2023-11-30T18:00:00" tod="4"><values t="-4" p="741" ws="3" wd="6" hum="84" hi="-8" cl="2" pt="2" pr="1" prflt="0.3" ts="0" icon="n.c3.s1" descr="Облачно, небольшой снег" grade="3" gust_speed="7"></values></forecast><forecast valid="2023-11-30T21:00:00" tod="4"><values t="-4" p="742" ws="3" wd="6" hum="80" hi="-9" cl="3" pt="2" pr="1" prflt="0.3" ts="0" icon="c4.s1" descr="Пасмурно, небольшой снег" grade="5" gust_speed="8"></values></forecast></day><day date="2023-12-01" risem="505" setm="970" durm="515" sunrise="1701419124" sunset="1701447057" tmin="-6" tmax="-4" pmin="736" pmax="744" wsmin="1" wsmax="3" hummin="81" hummax="92" cl="3" pt="2" pr="2" ts="0" icon="c4.s2" descr="Пасмурно, снег" ws="3" wd="6" hum="86" grademax="5" prflt="5" gust_speed="9"></day><day date="2023-12-02" risem="506" setm="970" durm="516" sunrise="1701505616" sunset="1701533411" tmin="-9" tmax="-5" pmin="737" pmax="744" wsmin="0" wsmax="2" hummin="82" hummax="93" cl="3" pt="2" pr="0" ts="0" icon="c4" descr="Пасмурно, без осадков" ws="2" wd="7" hum="89" grademax="2" gust_speed="5"></day><day date="2023-12-03" risem="508" setm="969" durm="517" sunrise="1701592106" sunset="1701619769" tmin="-8" tmax="-5" pmin="738" pmax="745" wsmin="1" wsmax="3" hummin="84" hummax="87" cl="3" pt="2" pr="3" ts="0" icon="c4.s3" descr="Пасмурно, сильный снег" ws="3" wd="5" hum="85" grademax="2" prflt="8" gust_speed="8"></day><day date="2023-12-04" risem="509" setm="968" durm="517" sunrise="1701678594" sunset="1701706130" tmin="-12" tmax="-6" pmin="739" pmax="749" wsmin="0" wsmax="2" hummin="79" hummax="89" cl="2" pt="2" pr="1" ts="0" icon="d.c3.s1" descr="Облачно, небольшой снег" ws="2" wd="7" hum="84" grademax="4" prflt="1" gust_speed="4"></day><day date="2023-12-05" risem="511" setm="968" durm="519" sunrise="1701765079" sunset="1701792494" tmin="-12" tmax="-10" pmin="741" pmax="748" wsmin="1" wsmax="2" hummin="81" hummax="87" cl="3" pt="2" pr="3" ts="0" icon="c4.s3" descr="Пасмурно, сильный снег" ws="2" wd="1" hum="84" grademax="5" prflt="13" gust_speed="8"></day></location></weather>
2023-11-29 20:38:08.120 T:161932   ERROR <general>: weather.gismeteo [v.0.6.3+matrix.1]: Unhandled exception detected!
2023-11-29 20:38:08.120 T:161932   ERROR <general>: weather.gismeteo [v.0.6.3+matrix.1]: *** Start diagnostic info ***
2023-11-29 20:38:08.120 T:161932   ERROR <general>: weather.gismeteo [v.0.6.3+matrix.1]: System info: uname_result(system='Linux', node='jd-note', release='6.2.0-39-generic', version='#40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2', machine='x86_64')
2023-11-29 20:38:08.120 T:161990   DEBUG <general>: Thread JobWorker start, auto delete: true
2023-11-29 20:38:08.120 T:161932   ERROR <general>: weather.gismeteo [v.0.6.3+matrix.1]: OS info: Ожидайте
2023-11-29 20:38:08.121 T:161932   ERROR <general>: weather.gismeteo [v.0.6.3+matrix.1]: Kodi version: 19.4 Debian package version: 2:19.4+dfsg1-2
2023-11-29 20:38:08.121 T:161932   ERROR <general>: weather.gismeteo [v.0.6.3+matrix.1]: File: /home/johndoe/.kodi/addons/weather.gismeteo/resources/libs/gismeteo.py
2023-11-29 20:38:08.121 T:161990   DEBUG <general>: easy_acquire - Created session to http://www.msftncsi.com
2023-11-29 20:38:08.121 T:161932   ERROR <general>: weather.gismeteo [v.0.6.3+matrix.1]: Code context:
                                                     172:                    'pressure': {'min': self._get_int(xml_day.attrib['pmin']),
                                                     173:                                 'max': self._get_int(xml_day.attrib['pmax']),
                                                     174:>                                'avg': self._get_int(xml_day.attrib['p']),
                                                     175:                                 },
                                                     176:                    'cloudiness': xml_day.attrib['cl'],

2023-11-29 20:38:08.121 T:161932   ERROR <general>: weather.gismeteo [v.0.6.3+matrix.1]: Global variables:
                                                   GismeteoClient = <class 'resources.libs.gismeteo.GismeteoClient'>
                                                   GismeteoError = <class 'resources.libs.gismeteo.GismeteoError'>
                                                   calendar = <module 'calendar' from '/usr/lib/python3.10/calendar.py'>
                                                   etree = <module 'xml.etree.cElementTree' from '/usr/lib/python3.10/xml/etree/cElementTree.py'>
                                                   requests = <module 'requests' from '/home/johndoe/.kodi/addons/script.module.requests/lib/requests/__init__.py'>
                                                   time = <module 'time' (built-in)>
                                                   unicode_literals = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 2097152)
2023-11-29 20:38:08.121 T:161932   ERROR <general>: weather.gismeteo [v.0.6.3+matrix.1]: Local variables:
                                                   result = []
                                                   self = <resources.libs.Gismeteo object at 0x7f13518136d0>
                                                   tzone = 180
                                                   xml_day = <Element 'day' at 0x7f13a1e87010>
                                                   xml_location = <Element 'location' at 0x7f13a1e863e0>
2023-11-29 20:38:08.121 T:161932   ERROR <general>: weather.gismeteo [v.0.6.3+matrix.1]: **** End diagnostic info ****
2023-11-29 20:38:08.125 T:161932   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'KeyError'>
                                                   Error Contents: 'p'
                                                   Traceback (most recent call last):
                                                     File "/home/johndoe/.kodi/addons/script.module.simpleplugin3/libs/simpleplugin.py", line 795, in _get_cached_data
                                                       data, timestamp = cache[key]
                                                     File "/home/johndoe/.kodi/addons/script.module.simpleplugin3/libs/simpleplugin.py", line 381, in __getitem__
                                                       raise KeyError(key)
                                                   KeyError: "_location_forecast('ru', '4392'){}"

                                                   During handling of the above exception, another exception occurred:

                                                   Traceback (most recent call last):
                                                     File "/home/johndoe/.kodi/addons/weather.gismeteo/default.py", line 498, in <module>
                                                       weather.run()
                                                     File "/home/johndoe/.kodi/addons/weather.gismeteo/resources/libs/simpleweather/simpleweather.py", line 475, in run
                                                       self._resolve_function()
                                                     File "/home/johndoe/.kodi/addons/script.module.simpleplugin3/libs/simpleplugin.py", line 1128, in _resolve_function
                                                       return action_callable(self._params)
                                                     File "/home/johndoe/.kodi/addons/weather.gismeteo/default.py", line 364, in forecast
                                                       data = _location_forecast(lang, location.id)
                                                     File "/home/johndoe/.kodi/addons/script.module.simpleplugin3/libs/simpleplugin.py", line 850, in inner_wrapper
                                                       return self._get_cached_data(cache, func, duration,
                                                     File "/home/johndoe/.kodi/addons/script.module.simpleplugin3/libs/simpleplugin.py", line 801, in _get_cached_data
                                                       data = func(*args, **kwargs)
                                                     File "/home/johndoe/.kodi/addons/weather.gismeteo/default.py", line 415, in _location_forecast
                                                       return _call_method(gismeteo.forecast, params)
                                                     File "/home/johndoe/.kodi/addons/weather.gismeteo/default.py", line 472, in _call_method
                                                       return func(**params)
                                                     File "/home/johndoe/.kodi/addons/weather.gismeteo/resources/libs/gismeteo.py", line 263, in forecast
                                                       return self._get_forecast_info(x)
                                                     File "/home/johndoe/.kodi/addons/weather.gismeteo/resources/libs/gismeteo.py", line 107, in _get_forecast_info
                                                       'days': self._get_days_forecast(xml_location),
                                                     File "/home/johndoe/.kodi/addons/weather.gismeteo/resources/libs/gismeteo.py", line 174, in _get_days_forecast
                                                       'avg': self._get_int(xml_day.attrib['p']),
                                                   KeyError: 'p'
                                                   -->End of Python script error report<--
Add Comment
Author