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

A particular sample always crashes for me #117

Closed
BenKaehler opened this issue Mar 11, 2022 · 3 comments · Fixed by #122
Closed

A particular sample always crashes for me #117

BenKaehler opened this issue Mar 11, 2022 · 3 comments · Fixed by #122

Comments

@BenKaehler
Copy link
Contributor

Hi folks, sorry to leave another bug, but I seem to be having trouble fetching some samples. Many thousands of others I have downloaded over the past couple of weeks were fine, but specifically human oral (or Animal secretion) samples with ids matching '\.raw' fail. Perhaps not all of them, but excluding all 172 of them seems to make the other ~17k (~24k for Animal secretion) samples download without problems. This was the first example I found:

$ redbiom --version
redbiom, version 0.3.8
$ echo $context 
Deblur_2021.09-Illumina-16S-V4-150nt-ac8c0b
$ redbiom fetch samples --context $context --output samples.biom 11896.A2.raw
Traceback (most recent call last):
  File "/home/ben/miniconda3/envs/qiime2-2022.2/bin/redbiom", line 10, in <module>
    sys.exit(cli())
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/redbiom/commands/fetch.py", line 203, in fetch_samples_from_samples
    table, ambig = redbiom.fetch.data_from_samples(context, iterable,
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/redbiom/fetch.py", line 306, in data_from_samples
    return _biom_from_samples(context, samples, skip_taxonomy=skip_taxonomy)
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/redbiom/fetch.py", line 367, in _biom_from_samples
    data = se(fetch_sample, 0, context, id_)
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/redbiom/_requests.py", line 110, in f
    return json.loads(_parse_validate_request(s.get(url), 'EVALSHA'))
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/redbiom/_requests.py", line 6, in _parse_validate_request
    return req.json()[command]
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/requests/models.py", line 899, in json
    return complexjson.loads(
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/ben/miniconda3/envs/qiime2-2022.2/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Thanks very much for looking at this!

@wasade
Copy link
Member

wasade commented Mar 11, 2022

Thanks! What's happening is this, see also here for command structure. What I suspect is needed is to switch the script exec call to POST and place the arguments in the body. We've done this for some but apparently not all queries.

@sscansan
Copy link

This is what I was looking for, had the same problem, and deleted the issue I opened. Thanks

@wasade
Copy link
Member

wasade commented Nov 14, 2022

Thanks for the bump, @sscansan! It's on my radar, but I haven't yet had bandwidth to resolve outstanding issues with redbiom. A new release is clearly needed.

wasade added a commit to wasade/redbiom that referenced this issue Dec 16, 2022
wasade added a commit to wasade/redbiom that referenced this issue Dec 19, 2022
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

Successfully merging a pull request may close this issue.

3 participants