Closed moustafa-a closed 5 years ago
[{"utility_id": 17609, "start_date": "2018-09-28T00:00:00-08:00", "end_date": "2018-09-28T23:59:59-08:00"}, {"utility_id": 17609, "start_date": "2018-10-18T00:00:00-08:00", "end_date": "2018-10-18T23:59:59-08:00"}, {"utility_id": 14328, "start_date": "1969-12-31T00:00:00-08:00", "end_date": "1969-12-31T23:59:59-08:00"}, {"utility_id": 90, "start_date": "1969-12-31T00:00:00-08:00", "end_date": "1969-12-31T23:59:59-08:00"}]
Referring to commit https://github.com/olivancu/electricity-cost-calculator/commit/f2721516d801b5c437391281dfdadfbafd0040ae I had removed the timezone in the PDP event dates. I solved the issue by using a parser to read the dates, so now you can keep the PDP format you presented above and it should work.
@moustafa-a can you do a
git pull origin oadr
and let us know if your issue has been fixed?
Yes, I don't get an exception anymore. However the generated prices are still zero.
@moustafa-a could you tell us under which tariff you get only zeros? @anandkp92 this is maybe because we haven't updated A-10 & others for 2019
It is PGE A-10 (demand and energy). All the others seem to have values
Wed Mar 27 15:00:01 PDT 2019 Saw [xbos/mdal] MDAL 3 seconds 329.753 ms ago Traceback (most recent call last): File "/home/moustafa/go/src/openADR/electricity-cost-calculator/oadr_signal/getDRSignal.py", line 222, in
prices = getHourlyDayPrices(startDateTime=st, tariff_name=tariff, isItEventDay=isItAnEventDay)
File "/home/moustafa/go/src/openADR/electricity-cost-calculator/oadr_signal/getDRSignal.py", line 82, in getHourlyDayPrices
tariff_struct_from_openei_data(tariff_openei_data, bill_calc, pdp_event_filenames='PDP_events.json')
File "/home/moustafa/go/src/openADR/electricity-cost-calculator/openei_tariff/openei_tariff_analyzer.py", line 312, in tariff_struct_from_openei_data
pdp_dates = datetime.strptime(pdp_event['start_date'], '%Y-%m-%dT%H:%M:%S').replace(tzinfo=pytz.timezone('UTC')), datetime.strptime(
File "/usr/lib/python2.7/_strptime.py", line 335, in _strptime
data_string[found.end():])
ValueError: unconverted data remains: -08:00