Cynical Weather is now using Visual Crossing

Posted on
Tue Dec 20, 2022 12:33 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Cynical Weather is now using Visual Crossing

I should be a finalist for the procrastinator of the year awards. :)

Version 3.5 of Cynical Weather is now available. It replaces the dear, about-to-depart Dark Sky with Visual Crossing, a very much alive service that has graciously agreed to allow us to use them under essentially the same terms as before. Let's give a great hand of applause to them, and may they live long and prosper.

You all pretty much seemed to agree that you want to see what Visual Crossing has to offer, rather than the plugin trying to pretend that nothing has changed. So here's the deal:


What else is new? The UV Index reading has disappeared. There is a wind gust prediction. There is a new "severe risk" state that indicates, well, the risk of severe weather (basically thunderstorms, tornados, that kind of thing). For excruciating details, see https://www.visualcrossing.com/resources/documentation/weather-data/weather-data-documentation/.

Let me know if you run into any problems, and sorry it's taken this long.

Cheers
-- perry

Posted on
Tue Dec 20, 2022 8:03 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Cynical Weather is now using Visual Crossing

Hi Perry,

Thanks for updating your plugin. And, yes, huge kudos to Visual Crossing and their API offerings. Looks like one can get 1000 queries a day for free.

Image

Posted on
Wed Dec 21, 2022 8:55 am
jalves offline
Posts: 747
Joined: Jun 16, 2013

Re: Cynical Weather is now using Visual Crossing

Thanks Perry. I've just downloaded the plugin and gotten my API key. Setting up my new devices in Indigo. I look forward to exploring what data is available and how I can use it to make my Indigo installation smarter.

Appreciate your work on this.

Running Indigo 2023.2 on a 24" iMac M1), OS X 14.4
Jeff

Posted on
Wed Dec 21, 2022 3:11 pm
Liptrot offline
Posts: 7
Joined: Feb 07, 2017

Not loading properly...or is it pilot error

When I load the weather plug in I get the following errors. Not sure what I am doing wrong. Thanks for updating this to not use Dark Sky.

Stopping plugin Cynical Weather (pid 35829)
Stopped plugin Cynical Weather
Installing plugin Cynical Weather v3.5.0 (previous version 3.5.0 moved to trash)
Loading plugin "Cynical Weather 3.5.0" using API v3.0.0
Starting plugin "Cynical Weather 3.5.0" (pid 35892)
Cynical Weather API version 3.1
Cynical Weather Python version 3.10.2.final.0
Started plugin "Cynical Weather 3.5.0"
Cynical Weather Error in run_concurrent_thread: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 67, in diagnostic_log
yield
File ".../Server Plugin/cyin/debugging.py", line 77, in diagnose_call
return method(*args, **kwargs)
File ".../Server Plugin/cyin/asynplugin.py", line 64, in run_concurrent_thread
self.run()
File ".../Server Plugin/asyn/inject.py", line 60, in run
asyn.Controller.run(self)
File ".../Server Plugin/asyn/controller.py", line 105, in run
item._can_read()
File ".../Server Plugin/asyn/selectable.py", line 244, in _can_read
self._scan(input)
File ".../Server Plugin/asyn/scan.py", line 70, in _scan
self.callout(RAW, self.flush_scan())
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/ssl.py", line 155, in incoming
self._service()
File ".../Server Plugin/asyn/ssl.py", line 129, in _service
self._scan(rdata)
File ".../Server Plugin/asyn/scan.py", line 70, in _scan
self.callout(RAW, self.flush_scan())
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http_chunk.py", line 47, in incoming
self._pass_downstream(data[0])
File ".../Server Plugin/asyn/http_chunk.py", line 74, in _pass_downstream
self.callout('END', 'CHUNKS', data)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/zfilter.py", line 47, in incoming
self.callout(ctx)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http.py", line 281, in incoming
self.callout('body', self.body_reply)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/forecast/core.py", line 183, in cb
callout(asyn.Context('reading'), Reading(args[0], self.units))
File "plugin.py", line 160, in updated
self.updateAlerts(data.alerts)
File "plugin.py", line 169, in updateAlerts
alerts = [alert for alert in alerts if alert.expires >= now]
File "plugin.py", line 169, in <listcomp>
alerts = [alert for alert in alerts if alert.expires >= now]
TypeError: '>=' not supported between instances of 'NoneType' and 'float'

Cynical Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Wed Dec 21, 2022 4:18 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Weather is now using Visual Crossing

Ah, that's in processing weather alerts. That's hard to test because it depends on where you live.

Can you give me your geographic coordinates (longitude and latitude)? That may help me reproduce it.

Cheers
-- perry

Posted on
Wed Dec 21, 2022 5:59 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Cynical Weather is now using Visual Crossing

Hi, just trying this plug-in for the first time - getting the errors below and devices are not getting any info for weather, values are zeros - using 46 N, 123 E for location. Let me know if you need any other info.

Cynical Weather Error in run_concurrent_thread: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 67, in diagnostic_log
yield
File ".../Server Plugin/cyin/debugging.py", line 77, in diagnose_call
return method(*args, **kwargs)
File ".../Server Plugin/cyin/asynplugin.py", line 64, in run_concurrent_thread
self.run()
File ".../Server Plugin/asyn/inject.py", line 60, in run
asyn.Controller.run(self)
File ".../Server Plugin/asyn/controller.py", line 108, in run
item._can_write()
File ".../Server Plugin/asyn/resolve.py", line 76, in _can_write
self.callout(ctx, self.io)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/resolve.py", line 129, in _connected
self.callout(ctx, result)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http.py", line 231, in _connected
self.scheme.create(self)
File ".../Server Plugin/asyn/http.py", line 148, in create
request.insert_filter(SSL, hostname=request.host, uplink=request.incoming)
File ".../Server Plugin/asyn/selectable.py", line 433, in insert_filter
filter = filter_class(self.upstream, *args, **kwargs)
TypeError: 'NoneType' object is not callable

Cynical Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

_______
Norm

Posted on
Thu Dec 22, 2022 3:08 pm
Liptrot offline
Posts: 7
Joined: Feb 07, 2017

Re: Cynical Weather is now using Visual Crossing

I am at 41.268 and -72.494. The Connecticut coastline

Posted on
Thu Dec 22, 2022 4:42 pm
Korey offline
User avatar
Posts: 813
Joined: Jun 04, 2008
Location: Henderson, NV

Re: Cynical Weather is now using Visual Crossing

36ºN 115ºW

All good here Perry!

Thanks for the update!!

--
Korey

Posted on
Thu Dec 22, 2022 5:10 pm
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: Cynical Weather is now using Visual Crossing

Working well for me too. Thanks Perry.

Posted on
Thu Dec 22, 2022 7:52 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Weather is now using Visual Crossing

Bad news: I can't make it fail over here. :x

Those of you having trouble: Open the Cynical Weather plugin configuration dialog (the one where you entered your API key). Check the "Debug" checkbox. In the suddenly-appearing "Debug Modules" field, enter:

Code: Select all
asyn.http,forecast.core

Then reload the plugin and send me everything appearing in the Indigo log after that (until it's done failing :?).

Oh, and please confirm that you're using the latest version of Indigo. (That's 2022.1.2 where I'm sitting right now. Note the .2 at the end. Check the "About Indigo" dialog.)

Cheers
-- perry

Posted on
Fri Dec 23, 2022 9:30 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: Cynical Weather is now using Visual Crossing

Hi Perry,
Could you look at adding the date/time field as a custom state? Not critical by any means but convenient to see it when reviewing data.

Posted on
Fri Dec 23, 2022 10:06 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Cynical Weather is now using Visual Crossing

Edit added system info

macOS Monterey
Version 12.6.2
Mac mini (2018)
Processor 3 GHz 6-Core Intel Core i5
Memory 32 GB 2667 MHz DDR4
Startup Disk Macintosh HD
Graphics Intel UHD Graphics 630 1536 MB

Using Indigo 2022.1.2

Errors and photo of one device - thanks for any help - one question - new user for this plug-in - do I need to select the Dark Sky option for the api on the visual crossing web site — I just grabed the key and did not do anything else (beyond creating account)…

Reloading plugin "Cynical Weather 3.5.0" using API v3.0.0
Stopping plugin "Cynical Weather 3.5.0" (pid 31503)
Cynical Weather shutdown sensed
Cynical Weather Cynical Weather Daily forecast Day 1 stopping
Cynical Weather Cynical Weather Location stopping
Stopped plugin "Cynical Weather 3.5.0"
Starting plugin "Cynical Weather 3.5.0" (pid 37847)
Cynical Weather API version 3.1
Cynical Weather Python version 3.10.2.final.0
Cynical Weather debugging modules: asyn.http, forecast.core
Started plugin "Cynical Weather 3.5.0"
Cynical Weather mapping device "Cynical Weather Daily forecast Day 1" 962701010(dayforecast)
Cynical Weather Cynical Weather Daily forecast Day 1 starting
Cynical Weather mapping device "Cynical Weather Location" 201270824(location)
Cynical Weather Cynical Weather Location starting
Cynical Weather Cynical Weather Daily forecast Day 1 is now ready
Cynical Weather plugin starting asyn operation
Cynical Weather Error in run_concurrent_thread: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 67, in diagnostic_log
yield
File ".../Server Plugin/cyin/debugging.py", line 77, in diagnose_call
return method(*args, **kwargs)
File ".../Server Plugin/cyin/asynplugin.py", line 64, in run_concurrent_thread
self.run()
File ".../Server Plugin/asyn/inject.py", line 60, in run
asyn.Controller.run(self)
File ".../Server Plugin/asyn/controller.py", line 108, in run
item._can_write()
File ".../Server Plugin/asyn/resolve.py", line 76, in _can_write
self.callout(ctx, self.io)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/resolve.py", line 129, in _connected
self.callout(ctx, result)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http.py", line 231, in _connected
self.scheme.create(self)
File ".../Server Plugin/asyn/http.py", line 148, in create
request.insert_filter(SSL, hostname=request.host, uplink=request.incoming)
File ".../Server Plugin/asyn/selectable.py", line 433, in insert_filter
filter = filter_class(self.upstream, *args, **kwargs)
TypeError: 'NoneType' object is not callable

Cynical Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Cynical Weather plugin starting asyn operation
Attachments
2C5AB1D9-F6AB-42A4-83BA-AF4406A343C2.png
2C5AB1D9-F6AB-42A4-83BA-AF4406A343C2.png (36.68 KiB) Viewed 3023 times

_______
Norm

Posted on
Fri Dec 23, 2022 8:19 pm
Liptrot offline
Posts: 7
Joined: Feb 07, 2017

Re: Cynical Weather is now using Visual Crossing

Yes I am running the verson 2022.1.2

Here you go... Thanks.



Dec 23, 2022 at 9:12:23 PM
Enabling plugin "Cynical Weather 3.5.0" using API v3.0.0
Starting plugin "Cynical Weather 3.5.0" (pid 4726)
Cynical Weather API version 3.1
Cynical Weather Python version 3.10.2.final.0
Started plugin "Cynical Weather 3.5.0"
Cynical Weather mapping device "Clinton Cynical 2" 137765815(location)
Cynical Weather Clinton Cynical 2 starting
Cynical Weather mapping device "Cynical Clinton " 63810235(location)
Cynical Weather Cynical Clinton starting
Cynical Weather plugin starting asyn operation
Cynical Weather Clinton Cynical 2 updated
Cynical Weather Error in run_concurrent_thread: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 67, in diagnostic_log
yield
File ".../Server Plugin/cyin/debugging.py", line 77, in diagnose_call
return method(*args, **kwargs)
File ".../Server Plugin/cyin/asynplugin.py", line 64, in run_concurrent_thread
self.run()
File ".../Server Plugin/asyn/inject.py", line 60, in run
asyn.Controller.run(self)
File ".../Server Plugin/asyn/controller.py", line 105, in run
item._can_read()
File ".../Server Plugin/asyn/selectable.py", line 244, in _can_read
self._scan(input)
File ".../Server Plugin/asyn/scan.py", line 70, in _scan
self.callout(RAW, self.flush_scan())
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/ssl.py", line 155, in incoming
self._service()
File ".../Server Plugin/asyn/ssl.py", line 129, in _service
self._scan(rdata)
File ".../Server Plugin/asyn/scan.py", line 70, in _scan
self.callout(RAW, self.flush_scan())
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http_chunk.py", line 47, in incoming
self._pass_downstream(data[0])
File ".../Server Plugin/asyn/http_chunk.py", line 74, in _pass_downstream
self.callout('END', 'CHUNKS', data)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/zfilter.py", line 47, in incoming
self.callout(ctx)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http.py", line 281, in incoming
self.callout('body', self.body_reply)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/forecast/core.py", line 183, in cb
callout(asyn.Context('reading'), Reading(args[0], self.units))
File "plugin.py", line 160, in updated
self.updateAlerts(data.alerts)
File "plugin.py", line 169, in updateAlerts
alerts = [alert for alert in alerts if alert.expires >= now]
File "plugin.py", line 169, in <listcomp>
alerts = [alert for alert in alerts if alert.expires >= now]
TypeError: '>=' not supported between instances of 'NoneType' and 'float'

Cynical Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Cynical Weather plugin starting asyn operation
Cynical Weather Cynical Clinton updated
Cynical Weather Error in run_concurrent_thread: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 67, in diagnostic_log
yield
File ".../Server Plugin/cyin/debugging.py", line 77, in diagnose_call
return method(*args, **kwargs)
File ".../Server Plugin/cyin/asynplugin.py", line 64, in run_concurrent_thread
self.run()
File ".../Server Plugin/asyn/inject.py", line 60, in run
asyn.Controller.run(self)
File ".../Server Plugin/asyn/controller.py", line 105, in run
item._can_read()
File ".../Server Plugin/asyn/selectable.py", line 244, in _can_read
self._scan(input)
File ".../Server Plugin/asyn/scan.py", line 70, in _scan
self.callout(RAW, self.flush_scan())
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/ssl.py", line 155, in incoming
self._service()
File ".../Server Plugin/asyn/ssl.py", line 129, in _service
self._scan(rdata)
File ".../Server Plugin/asyn/scan.py", line 70, in _scan
self.callout(RAW, self.flush_scan())
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http_chunk.py", line 47, in incoming
self._pass_downstream(data[0])
File ".../Server Plugin/asyn/http_chunk.py", line 74, in _pass_downstream
self.callout('END', 'CHUNKS', data)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/zfilter.py", line 47, in incoming
self.callout(ctx)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http.py", line 281, in incoming
self.callout('body', self.body_reply)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/forecast/core.py", line 183, in cb
callout(asyn.Context('reading'), Reading(args[0], self.units))
File "plugin.py", line 160, in updated
self.updateAlerts(data.alerts)
File "plugin.py", line 169, in updateAlerts
alerts = [alert for alert in alerts if alert.expires >= now]
File "plugin.py", line 169, in <listcomp>
alerts = [alert for alert in alerts if alert.expires >= now]
TypeError: '>=' not supported between instances of 'NoneType' and 'float'

Cynical Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Cynical Weather plugin starting asyn operation

Dec 23, 2022 at 9:14:32 PM
Cynical Weather debugging modules: asyn.http, forecast.core
Reloading plugin "Cynical Weather 3.5.0" using API v3.0.0
Stopping plugin "Cynical Weather 3.5.0" (pid 4726)
Cynical Weather shutdown sensed
Cynical Weather Clinton Cynical 2 stopping
Cynical Weather Cynical Clinton stopping
Stopped plugin "Cynical Weather 3.5.0"
Starting plugin "Cynical Weather 3.5.0" (pid 4787)
Cynical Weather API version 3.1
Cynical Weather Python version 3.10.2.final.0
Cynical Weather debugging modules: asyn.http, forecast.core
Started plugin "Cynical Weather 3.5.0"
Cynical Weather mapping device "Clinton Cynical 2" 137765815(location)
Cynical Weather Clinton Cynical 2 starting
Cynical Weather mapping device "Cynical Clinton " 63810235(location)
Cynical Weather Cynical Clinton starting
Cynical Weather plugin starting asyn operation
Cynical Weather -> GET /VisualCrossingWebServices/rest/services/timeline/41.26900100708008,-72.49500274658203?unitGroup=us&key=ZKBNDBCEQ67XYRTE5Q7HHMFZW HTTP/1.1
Cynical Weather -> Host: weather.visualcrossing.com
Cynical Weather -> Connection: close
Cynical Weather -> Accept-Encoding: gzip
Cynical Weather -> User-Agent: Cynical-Weather/3.5.0 cy-asyn/1.1
Cynical Weather ->
Cynical Weather -> GET /VisualCrossingWebServices/rest/services/timeline/24.555059,-81.779984?unitGroup=us&key=ZKBNDBCEQ67XYRTE5Q7HHMFZW HTTP/1.1
Cynical Weather -> Host: weather.visualcrossing.com
Cynical Weather -> Connection: close
Cynical Weather -> Accept-Encoding: gzip
Cynical Weather -> User-Agent: Cynical-Weather/3.5.0 cy-asyn/1.1
Cynical Weather ->
Cynical Weather <- HTTP/1.1 200
Cynical Weather <- Date: Sat, 24 Dec 2022 02:14:46 GMT
Cynical Weather <- Content-Type: application/json
Cynical Weather <- Transfer-Encoding: chunked
Cynical Weather <- Connection: close
Cynical Weather <- Cache-Control: no-cache,no-transform
Cynical Weather <- Access-Control-Allow-Origin: *
Cynical Weather <- Access-Control-Allow-Methods: GET, POST, DELETE, PUT
Cynical Weather <- Access-Control-Allow-Headers: X-Requested-With, Content-Type, X-Codingpedia
Cynical Weather <- X-Powered-By: Visual Crossing Weather
Cynical Weather <- Content-Encoding: gzip
Cynical Weather <- HTTP/1.1 200
Cynical Weather <- Date: Sat, 24 Dec 2022 02:14:46 GMT
Cynical Weather <- Content-Type: application/json
Cynical Weather <- Transfer-Encoding: chunked
Cynical Weather <- Connection: close
Cynical Weather <- Cache-Control: no-cache,no-transform
Cynical Weather <- Access-Control-Allow-Origin: *
Cynical Weather <- Access-Control-Allow-Methods: GET, POST, DELETE, PUT
Cynical Weather <- Access-Control-Allow-Headers: X-Requested-With, Content-Type, X-Codingpedia
Cynical Weather <- X-Powered-By: Visual Crossing Weather
Cynical Weather <- Content-Encoding: gzip
Cynical Weather Clinton Cynical 2 updated
Cynical Weather Error in run_concurrent_thread: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 67, in diagnostic_log
yield
File ".../Server Plugin/cyin/debugging.py", line 77, in diagnose_call
return method(*args, **kwargs)
File ".../Server Plugin/cyin/asynplugin.py", line 64, in run_concurrent_thread
self.run()
File ".../Server Plugin/asyn/inject.py", line 60, in run
asyn.Controller.run(self)
File ".../Server Plugin/asyn/controller.py", line 105, in run
item._can_read()
File ".../Server Plugin/asyn/selectable.py", line 244, in _can_read
self._scan(input)
File ".../Server Plugin/asyn/scan.py", line 70, in _scan
self.callout(RAW, self.flush_scan())
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/ssl.py", line 155, in incoming
self._service()
File ".../Server Plugin/asyn/ssl.py", line 129, in _service
self._scan(rdata)
File ".../Server Plugin/asyn/scan.py", line 70, in _scan
self.callout(RAW, self.flush_scan())
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http_chunk.py", line 47, in incoming
self._pass_downstream(data[0])
File ".../Server Plugin/asyn/http_chunk.py", line 74, in _pass_downstream
self.callout('END', 'CHUNKS', data)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/zfilter.py", line 47, in incoming
self.callout(ctx)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http.py", line 281, in incoming
self.callout('body', self.body_reply)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/forecast/core.py", line 183, in cb
callout(asyn.Context('reading'), Reading(args[0], self.units))
File "plugin.py", line 160, in updated
self.updateAlerts(data.alerts)
File "plugin.py", line 169, in updateAlerts
alerts = [alert for alert in alerts if alert.expires >= now]
File "plugin.py", line 169, in <listcomp>
alerts = [alert for alert in alerts if alert.expires >= now]
TypeError: '>=' not supported between instances of 'NoneType' and 'float'

Cynical Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Cynical Weather plugin starting asyn operation
Cynical Weather Cynical Clinton updated
Cynical Weather Error in run_concurrent_thread: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 67, in diagnostic_log
yield
File ".../Server Plugin/cyin/debugging.py", line 77, in diagnose_call
return method(*args, **kwargs)
File ".../Server Plugin/cyin/asynplugin.py", line 64, in run_concurrent_thread
self.run()
File ".../Server Plugin/asyn/inject.py", line 60, in run
asyn.Controller.run(self)
File ".../Server Plugin/asyn/controller.py", line 105, in run
item._can_read()
File ".../Server Plugin/asyn/selectable.py", line 244, in _can_read
self._scan(input)
File ".../Server Plugin/asyn/scan.py", line 70, in _scan
self.callout(RAW, self.flush_scan())
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/ssl.py", line 155, in incoming
self._service()
File ".../Server Plugin/asyn/ssl.py", line 129, in _service
self._scan(rdata)
File ".../Server Plugin/asyn/scan.py", line 70, in _scan
self.callout(RAW, self.flush_scan())
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http_chunk.py", line 47, in incoming
self._pass_downstream(data[0])
File ".../Server Plugin/asyn/http_chunk.py", line 74, in _pass_downstream
self.callout('END', 'CHUNKS', data)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/zfilter.py", line 47, in incoming
self.callout(ctx)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/http.py", line 281, in incoming
self.callout('body', self.body_reply)
File ".../Server Plugin/asyn/core.py", line 163, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/asyn/core.py", line 163, in <listcomp>
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/forecast/core.py", line 183, in cb
callout(asyn.Context('reading'), Reading(args[0], self.units))
File "plugin.py", line 160, in updated
self.updateAlerts(data.alerts)
File "plugin.py", line 169, in updateAlerts
alerts = [alert for alert in alerts if alert.expires >= now]
File "plugin.py", line 169, in <listcomp>
alerts = [alert for alert in alerts if alert.expires >= now]
TypeError: '>=' not supported between instances of 'NoneType' and 'float'

Cynical Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Cynical Weather plugin starting asyn operation

Posted on
Sat Dec 24, 2022 7:40 am
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Re: Cynical Weather is now using Visual Crossing

I had the same issue above. To get around it, I patched line 169 of plugin.py to check if alert.expres is not None:

Code: Select all
      alerts = [alert for alert in alerts if alert.expires is not None and alert.expires >= now]


Now the plug-in is working correctly.

Posted on
Sat Dec 24, 2022 2:50 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Weather is now using Visual Crossing

Version 3.5.1 (now available) should fix the alert problems.

norcoscia, I have no idea what's happening to you. Your dump shows something going wrong setting the (encrypted) communication with the weather server, before we even get any data to process. So far it looks like you're the only one seeing that problem, so you may be reduced to the dreaded "twiddle everything to see if it changes" approach to debugging it. :-(

Cheers
-- perry

Who is online

Users browsing this forum: No registered users and 14 guests