Fixing the Failed to deserialize variable error
Issue description
When you open a DataSphere project, you see the following error message:
Failed to deserialize variable %VAR_NAME%
Run the following code to delete it: del_datasphere_variables
Where %VAR_NAME% is the name of the variable the system was unable to deserialize.
Solution
The following variables cannot be serialized means that some variables cannot be serialized and saved. The interpreter keeps its current state when the configuration changes. All computation results, including variable values, are also saved.
Note
Since some variables cannot get serialized, they cannot be saved. For example, let's assume there is a variable with a file open for writing: f = open("file.txt", "w"). You will see the following warning when assigning values to such variables: The following variables cannot be serialized. Such a warning will not affect your code execution and further computation results.
Run the following code to delete it: del_datasphere_variables means that the variable previously resided in GPU memory but was not moved to the current CPU memory.
The error message suggests how to reset the variable: use the del_datasphere_variables method to delete it, and then run all associated cells in the same configuration.
If the issue persists
If the above actions did not help, create a support ticket
- Project URL from the browser address bar.
- Full text of the error message.
- HAR file with the recorded communications between the browser and the server hosting the DataSphere project.