Skip to content

read_list returns int value on missing object keys #16

@rsdoiel

Description

@rsdoiel

If you request a list of keys and some are not found in the list passed to dataset.read_list(c_name, keys) then the value returned in an integer. This is not helpful. It should be recording an error in generating the list of objects but return the list for the ones present.

Encounter this when using dataset.read_list() to generated a list of citations and I happened to pass the wrong values for keys.

Also notice I have some really clumsy handling of encoding/decoding values to and from strings in dataset.py. I can simplify that code by checking if isinstance(value, bytes) then doing value = value.decode('utf-8') per the Python idiom to get things to a str before handing to json.loads().

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions