AssertionError: surface weather data can not always be loaded
I get an AssertionError with
from BCO.Instruments import SfcWeather; sfc_RR = SfcWeather(start='20170101',end='20171201')
as the following:
`AssertionError Traceback (most recent call last) in () ----> 1 sfc_RR = SfcWeather(start='20170101',end='20171201')
/home/mpim/bla/.local/lib/python3.6/site-packages/BCO/Instruments/SfcWeather.py in init(self, start, end) 80 self.lon = None 81 ---> 82 self.__getAttributes() 83 84 def __getAttributes(self):
/home/mpim/bla/.local/lib/python3.6/site-packages/BCO/Instruments/SfcWeather.py in __getAttributes(self) 87 """ 88 ---> 89 self.title = self._getAttrFromNC("title") 90 self.device = self._getAttrFromNC("devices") 91 self.temporalResolution = self._getAttrFromNC("resolution")
/home/mpim/m300408/.local/lib/python3.6/site-packages/BCO/Instruments/Device_module.py in _getAttrFromNC(self, value) 266 267 _date = self.start.date() --> 268 nc = self._getNc(_date) 269 270 nc_lines = str(nc).split("\n")
/home/mpim/bla/.local/lib/python3.6/site-packages/BCO/Instruments/Device_module.py in _getNc(self, date) 364 365 """ --> 366 _file = self._getFile(date) 367 368 if "bz2" in _file[-5:]:
/home/mpim/bla/.local/lib/python3.6/site-packages/BCO/Instruments/Device_module.py in _getFile(self, date) 322 else: 323 # print(self._instrument, date) --> 324 _nameStr = "/".join(tools.getFileName(self._instrument, date, use_ftp=BCO.USE_FTP_ACCESS,filelist=self._ftp_files).split("/")[-2:]) 325 326 if BCO.USE_FTP_ACCESS:
/home/mpim/bla/.local/lib/python3.6/site-packages/BCO/tools/tools.py in getFileName(instrument, date, use_ftp, filelist, ftp_client) 269 270 # make sure only one file with that name was found: --> 271 assert len(name) == 1 272 name = name[0] 273
AssertionError:`
However, sfc_RR = SfcWeather(start='20180101',end='20180301')
is fine. It seems that larger time ranges cause problems.