Deserialize does not work when reopen

Hey guys,

I do not understand why the first code returns true while it does not work when I close the Jupyter Notebook, open it again and run only the second code.

Of course the file XX.jls is still in the same folder as the Notebook.

using DataFrames, Serialization
Test=[1,2]
XX=DataFrame("Test"=>Test)
serialize("XX.jls", XX)
YY=deserialize("XX.jls")
YY==XX

# returns true
using Serialization
deserialize("XX.jls")
KeyError: key DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0] not found

Any help is highly appreciated :slight_smile:
cheers

You can’t make a DataFrame object if you don’t have DataFrames loaded.

3 Likes

:man_facepalming: :man_facepalming: :man_facepalming:

1 Like