question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The following Table formats cannot serialize `None`

See original GitHub issue

Description

Formats: asdf, fits (?), ~hdf5~ (has no NULL)

Expected behavior

None should be able to be written (and read).

Actual behavior

They raise various errors complaining about serialization.

Steps to Reproduce

asdf

t = table.Table(dict(a=[0], b=[None]))
t.write("temp.asdf", format="asdf", overwrite=True)

… ValueError: Unknown dtype object

fits

t = table.Table(dict(a=[0], b=[None]))
t.write("temp.fits", format="fits", overwrite=True)

… ValueError: Illegal format object.

hdf5

t = table.Table(dict(a=[0], b=[None]))
t.write("temp.hdf5", format="hdf5", overwrite=True)

… TypeError: Object dtype dtype(‘O’) has no native HDF5 equivalent

System Details

macOS-10.16-x86_64-i386-64bit Python 3.8.2 | packaged by conda-forge | (default, Apr 24 2020, 07:56:27) [Clang 9.0.1 ] Numpy 1.18.4 astropy 4.3.dev1486+gddc6fb76f.d20210505 Scipy 1.4.1 Matplotlib 3.4.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
pllimcommented, May 11, 2021

What’s wrong with the good ol’ -999?

1reaction
nstarmancommented, Aug 31, 2021

I suppose we can close this. The problems remain, but I think it’s a won't-fix since the underlying formats don’t support the serialization.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: cannot serialize x.x (type float) (Elementtree)
Interesting. I see that it is not going to work with a float because the _escape_cdata function uses the in operator ( if...
Read more >
Service Update 10 for Microsoft Dynamics 365 9.0.2
When attempting to load a form in UCI, the following error occurs: "Cannot serialize a request with no attribute metadata". Removing and re-adding...
Read more >
Serialization — Ray 2.2.0 - the Ray documentation
You can often avoid serialization issues by using only native types (e.g., numpy arrays or lists/dicts of numpy arrays and other primitive types),...
Read more >
Script serialization - Unity - Manual
Serialization is the automatic process of transforming data structures or GameObject states into a format that Unity can store and reconstruct later.
Read more >
Parameter Serialization - Swagger
The following table shows how OpenAPI keywords are mapped to the URI Template modifiers. Keyword, URI Template Modifier. style: simple, none. style: label...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found