xmunoz / sodapy

Python client for the Socrata Open Data API
MIT License
402 stars 114 forks source link

Delete By Row ID Not Working #81

Closed darrylackley closed 3 years ago

darrylackley commented 3 years ago

I'm trying to delete individual rows by row_id using the following:

client.delete("data-set", row_id=2)

where but am getting the following result

HTTPError: 400 Client Error: Bad Request.
    Column is maltyped; for field ':id' we expected 'row_identifier' but got '"2"'

I don't have an explicit Row Identifier on the table. Unfortunately it's a private data set as its in a Tyler instantiation for criminal justice data, so I can't share the URL for reproduction. I've verified that delete works (removes the entire table), so I don't think it's a permission issue. Any help is appreciated.

xmunoz commented 3 years ago

Are you able to manually execute an HTTP DELETE request with curl or something similar? According to this doc, the URL structure for datasets with publisher-specified identifiers should be the same, but clearly this isn't working for you.

If you manage to figure it out, please post the full successful HTTP request or curl command here so that I can update the library to work for this use case.

xmunoz commented 3 years ago

Since there is no repro for this bug, I'm going to close this. Feel free to re-open once you have the steps to reproduce or at least a successful curl request.