Closed tarmangue closed 4 years ago
This error message indicates that it's probably a network issue. Looks like the request times out after 10 seconds. Have you tried to perform this action manually or with curl to see if it works?
Also, if you could provide the code that caused this exception that would be helpful for debugging.
I have tried with longer timeouts too, same result. Is there a limit to the upload size? Anyway, below is the code:
domain = "example.domain.org"
dataset = "abcd-1234"
client = Socrata(domain, "aBcDeF123455969", username="example@email.com", password="password")
data = open("data.json", encoding='utf-8')
print(client.replace(dataset, data))
client.close()
Update, if I create a ficticious row for the dataset that I am trying to update, and upsert it like so:
client = Socrata(domain, token, username=user, password=pwd)
data = [{'col1': 'AAA', 'col2': 'BBB'}]
print(client.upsert(dataset, data))
client.close()
I get the expected behaviour. Which makes me think the problem might be the fact that I am trying to push a 600k row dataset?
Yes, that is almost certainly the cause. Try splitting up the upsert into a few, more manageably-sized operations.
I keep getting the same error when using upsert or replace:
I have tried using csv and json as the data format, neither work. Any idea what is going on?