Skip to content

Forecastwrapper can't get past 19-04-2017 #203

@saroele

Description

@saroele

ValueError Traceback (most recent call last)
in ()
13 weather_data = weather.days(irradiances=irradiances,
14 wind_orients=orientations,
---> 15 heating_base_temperatures=[0, 6, 8, 10, 12, 14, 16, 18]).dropna(axis=1)
16 weather_data.drop(['icon', 'summary', 'moonPhase', 'windBearing', 'temperatureMaxTime', 'temperatureMinTime',
17 'apparentTemperatureMaxTime', 'apparentTemperatureMinTime', 'uvIndexTime',

/usr/local/opengrid/opengrid/library/forecastwrapper.py in days(self, heating_base_temperatures, cooling_base_temperatures, irradiances, wind_orients)
189 hourly_frame = self.hours(irradiances=irradiances,
190 no_truncate=True,
--> 191 wind_orients=wind_orients)
192 temperature = hourly_frame.temperature.resample('d').mean()
193 ghi = hourly_frame.GlobalHorizontalIrradiance.dropna().resample('d').sum()

/usr/local/opengrid/opengrid/library/forecastwrapper.py in hours(self, irradiances, no_truncate, wind_orients)
238 pandas.DataFrame
239 """
--> 240 day_list = [self._forecast_to_hour_series(forecast) for forecast in self.forecasts]
241 frame = pd.concat(day_list)
242 frame = self._fix_index(frame)

/usr/local/opengrid/opengrid/library/forecastwrapper.py in (.0)
238 pandas.DataFrame
239 """
--> 240 day_list = [self._forecast_to_hour_series(forecast) for forecast in self.forecasts]
241 frame = pd.concat(day_list)
242 frame = self._fix_index(frame)

/usr/local/opengrid/opengrid/library/forecastwrapper.py in _forecast_to_hour_series(self, forecast)
339
340 hour_list = [pd.Series(self._flatten_solar(hour.d)) for hour in forecast.hourly().data]
--> 341 frame = pd.concat(hour_list, axis=1).T
342 frame.temperature = frame.temperature.astype(float)
343 return frame

/usr/local/lib/python3.5/dist-packages/pandas/tools/merge.py in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity, copy)
1449 keys=keys, levels=levels, names=names,
1450 verify_integrity=verify_integrity,
-> 1451 copy=copy)
1452 return op.get_result()
1453

/usr/local/lib/python3.5/dist-packages/pandas/tools/merge.py in init(self, objs, axis, join, join_axes, keys, levels, names, ignore_index, verify_integrity, copy)
1482
1483 if len(objs) == 0:
-> 1484 raise ValueError('No objects to concatenate')
1485
1486 if keys is None:

ValueError: No objects to concatenate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions