You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add_category already auto-ds._reload_variables() before closing, which is needed, however if we follow this up with replace_values we get a 400 bad request that the added category is not defined, e.g.:
ClientError: (<Response [400]>, 'https://app.crunch.io/api/datasets/909f580538cb46ddb4f3453d574a576e/table/', {u'status': u'400 Bad Request', u'message': u'Error executing command: Category 101 is not defined.'})
I think this is because ds.resource.table is out of date, even though the variables catalog is not:
Currently the only way to fix this is to refresh the dataset manually.
Perhaps when replace_values is called, the dataset needs to be auto-refreshed before taking any other action? This sounds expensive but would be preferable to an error and having to do that manually anyway.
How to reproduce this error:
Add a category to a variable using ds.add_category()
Replace values into that new category using ds.replace_values()
The text was updated successfully, but these errors were encountered:
add_category
already auto-ds._reload_variables()
before closing, which is needed, however if we follow this up withreplace_values
we get a 400 bad request that the added category is not defined, e.g.:ClientError: (<Response [400]>, 'https://app.crunch.io/api/datasets/909f580538cb46ddb4f3453d574a576e/table/', {u'status': u'400 Bad Request', u'message': u'Error executing command: Category 101 is not defined.'})
I think this is because
ds.resource.table
is out of date, even though the variables catalog is not:scrunch/scrunch/datasets.py
Line 2365 in 4cfc508
Currently the only way to fix this is to refresh the dataset manually.
Perhaps when
replace_values
is called, the dataset needs to be auto-refreshed before taking any other action? This sounds expensive but would be preferable to an error and having to do that manually anyway.How to reproduce this error:
ds.add_category()
ds.replace_values()
The text was updated successfully, but these errors were encountered: