-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
bugSomething isn't workingSomething isn't workingum/ppRelating to UM or PP format filesRelating to UM or PP format files
Milestone
Description
In cf-python==3.11.0
Example:
Actual behaviour (paths munged):
>>> f1 = cf.read("packed.pp", um={"fmt": "pp", "endian":"big", "word_size": "4", "version": "4.2"}) # this is okay
>>> f2 = cf.read("packed.pp", um={"fmt": "pp", "endian":"big", "word_size": "4"})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/path/to/lib/python3.8/site-packages/cfdm/decorators.py", line 171, in verbose_override_wrapper
return method_with_verbose_kwarg(*args, **kwargs)
File "/path/to/lib/python3.8/site-packages/cf/read_write/read.py", line 757, in read
file_contents = _read_a_file(
File "/path/to/lib/python3.8/site-packages/cfdm/decorators.py", line 171, in verbose_override_wrapper
return method_with_verbose_kwarg(*args, **kwargs)
File "/path/to/lib/python3.8/site-packages/cf/read_write/read.py", line 1031, in _read_a_file
out = UM.read(
File "/path/to/lib/python3.8/site-packages/cfdm/decorators.py", line 171, in verbose_override_wrapper
return method_with_verbose_kwarg(*args, **kwargs)
File "/path/to/lib/python3.8/site-packages/cf/read_write/um/umread.py", line 3501, in read
um = [
File "/path/to/lib/python3.8/site-packages/cf/read_write/um/umread.py", line 3502, in <listcomp>
UMField(
File "/path/to/lib/python3.8/site-packages/cf/read_write/um/umread.py", line 668, in __init__
if header_um_version > 0 and int(um_version) == um_version:
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Desired behaviour. something like:
>>> f2 = cf.read("packed.pp", um={"fmt": "pp", "endian":"big", "word_size": "4"})
Traceback (most recent call last):
[...]
KeyError: dictionary used as optional 'um' parameter must contain keys 'fmt', 'endian', 'word_size' and 'version'
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingum/ppRelating to UM or PP format filesRelating to UM or PP format files