1

While I was trying to upload some data to dolphindb server using python api, I found that dolphindb server will refuse to accept it and throw an exception if my dataframe contains null values. The following code could reproduce this.

import dolphindb as ddb
import numpy as np
import pandas as pd

df = pd.DataFrame({"a": ["a", np.NaN]})
sess = ddb.Session()
sess.connect('localhost', 9921)
sess.upload({"t", df})
sess.run("1")

The error msg is as follows

 <Server Exception> in upload: Failed to read response header from the socket with IO error type 1

How to solve this problem?

siupan
  • 57
  • 3

1 Answers1

1

The code looks good. Tested working fine. Please double check if you connect to the server properly or If the session is timed out. Otherwise, it could be a feature that had not been implemented at the time of question being raised.

dovish618
  • 156
  • 5