The following Table formats cannot serialize `None`
See original GitHub issueDescription
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:
- Created 2 years ago
- Comments:14 (14 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What’s wrong with the good ol’
-999
?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.