Page 2 of 2

Re: Cynical Weather is now using Visual Crossing

PostPosted: Sat Dec 24, 2022 3:25 pm
by norcoscia
OK, thanks for taking a look - guess it is the universe telling me (once again) to cut my losses with home automation - have a save and fun holiday perry…

Re: Cynical Weather is now using Visual Crossing

PostPosted: Sat Dec 24, 2022 6:44 pm
by mundmc
Thanks Perry! Will give it a go shortly

Re: Cynical Weather is now using Visual Crossing

PostPosted: Mon Dec 26, 2022 10:39 am
by ryanbuckner
boisy wrote:
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.


this patch worked for me

Re: Cynical Weather is now using Visual Crossing

PostPosted: Mon Jan 02, 2023 2:14 pm
by t-star
I just loaded Cynical Weather for the first time. Getting an error that looks like ones previously seen.
Location: 34 N, 84 West
Did the debug steps.

Code: Select all
Jan 2, 2023 at 3:09:50 PM
   Cynical Weather                 debugging enabled
   Cynical Weather                 debugging modules: asyn.http, forecast.core
   Reloading plugin "Cynical Weather 3.5.1" using API v3.0.0
   Stopping plugin "Cynical Weather 3.5.1" (pid 978)
   Cynical Weather                 shutdown sensed
   Cynical Weather                 Home Location stopping
   Stopped plugin "Cynical Weather 3.5.1"
   Starting plugin "Cynical Weather 3.5.1" (pid 985)
   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.1"
   Cynical Weather                 mapping device "Home Location" 67670180(location)
   Cynical Weather                 Home Location starting
   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

Re: Cynical Weather is now using Visual Crossing

PostPosted: Mon Jan 02, 2023 3:41 pm
by Different Computers
Just for fun, my errors are different and less wordy.

API key is in place. Indigo 2022.1 on Monterey.

Code: Select all
   Starting plugin "Cynical Weather 3.5.1" (pid 27870)
   Cynical Weather                 API version 3.1
   Cynical Weather                 Python version 3.10.2.final.0
   Started plugin "Cynical Weather 3.5.1"
   Cynical Weather                 mapping device "Cynical Weather this hour" 15849741(hourforecast)
   Cynical Weather                 Cynical Weather this hour starting
   Cynical Weather                 mapping device "Weather at the House" 529210800(location)
   Cynical Weather                 Weather at the House starting
   Cynical Weather                 Cynical Weather this hour is now ready
   Cynical Weather                 mapping device "Three Day Forecast" 523399016(dayforecast)
   Cynical Weather                 Three Day Forecast starting
   Cynical Weather                 Three Day Forecast is now ready
   Cynical Weather                 plugin starting asyn operation
   Cynical Weather Error           Weather at the House unavailable: weather service error: 401
   Cynical Weather Error           Cynical Weather this hour unavailable: host device Weather at the House is unavailable
   Cynical Weather Error           Three Day Forecast unavailable: host device Weather at the House is unavailable


The plugin log is, as yet, empty.

Re: Cynical Weather is now using Visual Crossing

PostPosted: Mon Jan 02, 2023 7:17 pm
by Perry The Cynic
Error 401 means unauthorized (it’s an ordinary http reply code). Check that you’ve pasted the correct API token into the configuration dialog, and that you haven’t inadvertently used it too much while testing it. (If it’s the latter, it should reset after a day of inactivity.)

Cheers
— perry

Re: Cynical Weather is now using Visual Crossing

PostPosted: Mon Jan 02, 2023 9:55 pm
by Different Computers
That was the hint I needed! Apparently my copy and paste didn't copy what I thought.

All seems working now.

Many thanks!

Re: Cynical Weather is now using Visual Crossing

PostPosted: Sun Jan 08, 2023 2:51 pm
by t-star
Tried to remove the plugin delete everything and reinstall. This shows up right after I create a location device. I don't get any errors until this happens. Assuming that the location is the first step after putting in the key. I didn't put any parameters in the location and let it pull from indigo.


Code: Select all
  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)

Re: Cynical Weather is now using Visual Crossing

PostPosted: Sun Jan 08, 2023 3:43 pm
by norcoscia
I think this is the same error people are reporting here now

viewtopic.php?f=25&t=26787

You might want to post it there but I’m not sure if that is necessary