Page 1 of 1
time data '11-11-2017' does not match format '%Y-%m-%d'
Posted: Sat Nov 11, 2017 8:53 am
by Different Computers
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.
Re: time data '11-11-2017' does not match format '%Y-%m-%d'
Posted: Sat Nov 11, 2017 11:25 am
by DaveL17
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:
- 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),
- each timestamp formatted as YYYY-MM-DD HH:MM:S.S (standard datetime format: %Y-%m-%d %H:%M:%S.%f ), and
- 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.
Re: time data '11-11-2017' does not match format '%Y-%m-%d'
Posted: Sat Nov 11, 2017 12:33 pm
by Different Computers
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.
Re: time data '11-11-2017' does not match format '%Y-%m-%d'
Posted: Sat Nov 11, 2017 1:41 pm
by DaveL17
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.
Re: time data '11-11-2017' does not match format '%Y-%m-%d'
Posted: Mon Sep 10, 2018 10:58 pm
by mclass
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
Re: time data '11-11-2017' does not match format '%Y-%m-%d'
Posted: Tue Sep 11, 2018 3:58 pm
by DaveL17
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.
TLDR;
It's not you. It's me.
Re: time data '11-11-2017' does not match format '%Y-%m-%d'
Posted: Tue Sep 11, 2018 4:10 pm
by DaveL17
-= 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.
Re: time data '11-11-2017' does not match format '%Y-%m-%d'
Posted: Tue Sep 11, 2018 9:18 pm
by mclass
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