Closed akouete-kpakpo closed 2 years ago
1st hypothesis retained: the file downloaded is of wrong format.
somehow the download with urllib got a corrupted file. when I copy the content on remote and paste it in local file then it works
Actually I get the full content of the Github page and not the content I am interested in. Have to write a parser with beautifulsoup to get the useful content.
After fixing the data problem, now I have
---------------------------------------------------------------------------
PCSEError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 YAMLCropDataProvider()
File ~/repository/github/nevergrad/venv/lib/python3.8/site-packages/pcse/fileinput/yaml_cropdataprovider.py:132, in YAMLCropDataProvider.__init__(self, fpath, repository, force_reload)
130 else:
131 msg = "No path or URL specified where to find YAML crop parameter files"
--> 132 raise exc.PCSEError(msg)
134 with open(self._get_cache_fname(fpath), "wb") as fp:
135 pickle.dump((self.compatible_version, self._store), fp, pickle.HIGHEST_PROTOCOL)
PCSEError: No path or URL specified where to find YAML crop parameter files
cd nevergrad/functions/irrigation/data/
git clone https://github.com/ajwdewit/WOFOST_crop_parameters.git
solved
Context
When I use https://github.com/ajwdewit/pcse_notebooks/blob/master/data/soil/ec3.soil, I have a
pcse.exceptions.PCSEError: Failed to parse the CABO file!
.Which file should I use?