time data '11-11-2017' does not match format '%Y-%m-%d'

Posted on
Sat Nov 11, 2017 8:53 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

time data '11-11-2017' does not match format '%Y-%m-%d'

This happened for the first time today, as far as I know.
Code: Select all
   Matplotlib Critical Error       [Chart Future weather] time data '11-11-2017' does not match format '%Y-%m-%d'

This might be related to changes in the WUnderground plugin, which is where the data originates.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sat Nov 11, 2017 11:25 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: time data '11-11-2017' does not match format '%Y-%m-%d'

That's right. The Matplotlib plugin presently requires your data to be formatted in a specific way:

If you are successful, the plugin will generate simple CSV data files like the one to the right. The plugin expects a certain structure for the data files it uses, so if you choose to include your own CSV data, your files should contain the following:

  1. one header row with the first column as the observation timestamp and the second column as the observation to be charted (note that the header value of the data column will be used for chart legend labels),
  2. each timestamp formatted as YYYY-MM-DD HH:MM:S.S (standard datetime format: %Y-%m-%d %H:%M:%S.%f ), and
  3. each observation on its own row

By selecting the date format MM-DD-YYYY in the Weather Underground plugin, your date format won't match the required YYY-MM-DD format that Matplotlib expects. At some point, I'll revise the matplotlib plugin to be more agnostic about date formatting, but until then, I'd suggest going back to YYY-MM-DD in WU.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Nov 11, 2017 12:33 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: time data '11-11-2017' does not match format '%Y-%m-%d'

Thanks!

This must have been a change in WU, as I didn't mess with any of those options. In fact, I don't think I had ever even realized those date options existed.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sat Nov 11, 2017 1:41 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: time data '11-11-2017' does not match format '%Y-%m-%d'

Yes - that was a new feature with v6.0.01. The default for WU is "DD-MM-YYYY' and in hindsight I should've made the default compatible with the required Matplotlib format. Sorry about that.

I'll change the WU default to be compatible for v6 (and the upcoming v7); although I acknowledge that doesn't help you now. :)

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Sep 10, 2018 10:58 pm
mclass offline
Posts: 312
Joined: May 13, 2015
Location: Melbourne, Australia

Re: time data '11-11-2017' does not match format '%Y-%m-%d'

Whilst not directly related to the Wunderground issue, I have today installed Matplotlib v0.7.05 on Indigo 7.1.1 running on OSX 10.11.6.

On creation of my first CSV Engine device I am getting the following error:

Code: Select all
 Matplotlib Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 433, in runConcurrentThread
  File "plugin.py", line 1077, in csv_refresh
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_strptime.py", line 325, in _strptime
ValueError: time data '' does not match format '%Y-%m-%d %H:%M:%S.%f'

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

I have tried different devices in the CSV engine, and the error continues.

It appears that time data is missing. Using datetime in terminal I get:
Code: Select all
datetime.datetime(2018, 9, 11, 15, 28, 36, 703497)

so it seems Python knows what's going on!!

Any suggestions?
TIA
mclass

Posted on
Tue Sep 11, 2018 3:58 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: time data '11-11-2017' does not match format '%Y-%m-%d'

mclass wrote:
Any suggestions?
TIA
mclass

I wrote out an exceptionally well written and pithy reply stating that I needed a bit more information to understand the result you're seeing (and at least one other user reported) because I was unable to reproduce the error. Then I tried some more stuff and was able to reproduce the error.

So this is a much less well written yet still nominally pithy reply to say that I now see the error and will work on a solution. :D

TLDR;
It's not you. It's me.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Sep 11, 2018 4:10 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: time data '11-11-2017' does not match format '%Y-%m-%d'

-= SITREP =-

Bug found and apparently exterminated. Look for v0.7.06 soon.

If you are so inclined, you can pull the latest repo from GitHub; a formal release will follow directly.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Sep 11, 2018 9:18 pm
mclass offline
Posts: 312
Joined: May 13, 2015
Location: Melbourne, Australia

Re: time data '11-11-2017' does not match format '%Y-%m-%d'

Hi Dave!

Thanks for the prompt response! Away from computer but will check it out asap.

(tried to keep this short and pithy )

mclass


Sent from my iPad using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest