Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling var.replace_values(...) fails with 404 on .../table/?limit=0 #363

Open
dmonroy opened this issue Jul 5, 2019 · 0 comments
Open

Comments

@dmonroy
Copy link
Contributor

dmonroy commented Jul 5, 2019

It doesn't happen all the time and actually executing same code again after a failure (ie re-running a script) succeeds.

Logs in backend shows this: (thanks @malecki for sharing)

"POST /api/datasets/.../table/?limit=0 HTTP/1.0" 404 92 "" "pycrunch/0.4.11"

The post to /datasets/ is part of the replace_values method here:

resp = self.resource.table.post(json.dumps(payload))

We are not passing the ?limit=0 querystring explicitly but perhaps that's implicit in self.resource.table as a side effect of setting that argument in scrunch.expressions.get_dataset_variables() function:

table = ds.follow("table", urlencode({
'limit': 0
}))

which is called from process_expr:
variables = get_dataset_variables(ds)

and process_expr is called from replace_values just before the post to table endpoint.

scrunch/scrunch/datasets.py

Lines 2377 to 2380 in c857398

if filter:
payload['filter'] = process_expr(parse_expr(filter), self.resource)
resp = self.resource.table.post(json.dumps(payload))

But this is too much guessing, we need to find a way to make it reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant