0

我正在尝试运行函数:bifacial.pvfactors_timeseries(),并得到错误:

类型错误:+= 不支持的操作数类型:“NoneType”和“str”。

我不确定我的哪个输入值是错误的。下面你可以看到我是如何编写它的函数,然后是所有输入值。

        bifacial = pvlib.bifacial.pvfactors_timeseries(solar_azimuth=
                                                       interim_weather_df[cf.name_solar_azimuth_column],
                                                       solar_zenith=
                                                       interim_weather_df[cf.name_solar_zenith_column],
                                                       surface_azimuth=
                                                       interim_weather_df[cf.name_surface_azimuth_column],
                                                       surface_tilt=interim_weather_df[cf.name_surface_tilt_column],
                                                       axis_azimuth=self.axis_azimuth,
                                                       timestamps=interim_weather_df.index,
                                                       dni=interim_weather_df[cf.name_dni_column],
                                                       dhi=interim_weather_df[cf.name_dhi_column],
                                                       gcr=self.gcr,
                                                       pvrow_height=model.input_values.pv_row_height,
                                                       pvrow_width=model.input_values.pv_row_width,
                                                       albedo=model.input_values.albedo,
                                                       n_pvrows=3,
                                                       index_observed_pvrow=1,
                                                       rho_front_pvrow=0.03,
                                                       rho_back_pvrow=0.05,
                                                       horizon_band_angle=15.0)

输入结构截图:

输入太阳方位角,输入太阳天顶,输入surface_azimuth输入surface_tilt输入时间戳输入dni输入dhi

所有其他输入都是浮点数和整数。

我还尝试只使用单个数值作为输入而不使用 DataFrame,如下所示。我仍然遇到同样的错误。

        bifacial = pvlib.bifacial.pvfactors_timeseries(solar_azimuth=235.7,
                                                       solar_zenith=75.6,
                                                       surface_azimuth=270,
                                                       surface_tilt=72.8,
                                                       axis_azimuth=180,
                                                       timestamps=datetime.datetime.strptime('01-01-2021  13:00:00', '%d-%m-%Y %H:%M:%S'),
                                                       dni=29,
                                                       dhi=275,
                                                       gcr=0.2,
                                                       pvrow_height=2,
                                                       pvrow_width=2,
                                                       albedo=0.1,
                                                       n_pvrows=3,
                                                       index_observed_pvrow=1,
                                                       rho_front_pvrow=0.03,
                                                       rho_back_pvrow=0.05,
                                                       horizon_band_angle=15.0)

python 版本:3.8.5 pvlib 版本:0.8.0 pv 因子版本:1.5.0 pandas 版本:1.2.1

有谁知道该错误的解决方案?非常感谢您的帮助!

4

1 回答 1

0

我解决了这个问题。我只在 anaconda 和 pip 环境之间产生了一些干扰。

于 2021-02-11T07:56:43.990 回答