I am modeling a PV array using PVlib and sometimes when I am trying to access the weather forecast data I get the following error:
ValueError: Big-endian buffer not supported on little-endian compiler
I am unsure why it only happens sometimes and not every time I run the code. Below is the code I am running and the last line is the one causing the error. Any help in solving this would be greatly appreciated, thank you!!
# built-in python modules
import datetime
import inspect
import os
import pytz
# scientific python add-ons
import numpy as np
import pandas as pd
# plotting
# first line makes the plots appear in the notebook
%matplotlib inline
import matplotlib.pyplot as plt
import matplotlib as mpl
#import the pvlib library
from pvlib import solarposition,irradiance,atmosphere,pvsystem
from pvlib.forecast import GFS
from pvlib.modelchain import ModelChain
pd.set_option('display.max_rows', 500)
latitude, longitude, tz = 21.300268, -157.80723, 'Pacific/Honolulu'
# specify time range.
# start = pd.Timestamp(datetime.date.today(), tz=tz)
pacific = pytz.timezone('Etc/GMT+10')
# print(pacific)
# datetime.datetime(year, month, day, hour, minute, second, microsecond, tzinfo)
start2 = pd.Timestamp(datetime.datetime(2020, 2, 10, 13, 0, 0, 0, pacific))
# print(start)
# print(start2)
# print(datetime.date.today())
end = start2 + pd.Timedelta(days=1.5)
# Define forecast model
fm = GFS()
# get data from location specified above
forecast_data = fm.get_processed_data(latitude, longitude, start2, end)
# print(forecast_data)