Closed cjroberts closed 4 years ago
Hi Charles, thanks for raising this.
Firstly I've transferred this over to cfunits Issue Tracker as the bug is emerging from there rather than cf-python itself. At some point a small mistake was made in that codebase as strftime()
clearly needs an argument.
with previously working code after updating cf-python:
Interestingly, it seems from git blame
that the line in question with the mistake has been in cfunits for ~3 years, so there must have been some change(s) upstream in v.3.5.1 cf-python relative to previous versions which meant the buggy line was run where previously it was not, rather than that line having been introduced for the latest cfunits.
Anyway, I'll push up a fix to the development branch now. Do you have a workaround so that this issue does not get in the way of what you are trying to achieve with cf-python? If not, we are planning to do releases early next week, so there will be a new release set with the bug fixed available then, so you will not have to wait too long.
Thanks again.
Hi Sadie,
Thank you for your help.
The Surface Temperature group of NCEO has a web server, which uses cf-python to generate regridded surface temperature (using our own method rather than ESMPy), but we have not upgraded our production version of cf-units yet. So, we can wait until the new release next week before upgrading.
Please could I also ask what the situation is with the conda version of cf-python, which is a few releases behind the PyPI version?
Many thanks.
So, we can wait until the new release next week before upgrading.
Excellent. Thanks for you patience.
In terms of a fix, I have resolved the immediate issue (& another one in turn relating to part of the formatted unit being printed without being converted from byte-string to unicode first!) in e4d2b202941c46cb04187dbf722b7e9c7c1ed197, though I haven't tested this much end-to-end to cf-python & I've guessed at the required datetime format to use based on the docstring examples but otherwise am not sure what is intended as a format to return. So I will wait until Monday when I can double check the required/desired format with David before perhaps making some tweaks & marking this as closed. Either way the new releases will contain the final fix.
Please could I also ask what the situation is with the conda version of cf-python, which is a few releases behind the PyPI version?
Sure. You are correct it is a few releases behind.
Overall we have discussed it & are keen & hoping to be able to keep the PyPI & conda latest releases more in sync going forward. We haven't made concrete plans but I imagine we will definitely want to upload the releases we make next week to the ncas
conda channel. Since you are another person to request this of late, I shall try to push to get it done next week.
Hi, I spoke with David earlier and he thinks the fix in the commit I referenced above is fine & sufficient, so we can consider this closed. The fix will be in the cf-python 3.6.0 out later this week, certainly on PyPI but we'll try to get it out on conda not long afterwards. Thanks.
Thank you very much for your help. I will keep an eye out for the release.
Hi,
I am having the following issue when reading files with previously working code after updating cf-python:
I have tried on the command line and receive the same error when reading a different netCDF file.
My environment is:
Please would you be able to help?