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

Biomart does not work: bytes is not json serializable #13455

Open
hexylena opened this issue Feb 28, 2022 · 0 comments
Open

Biomart does not work: bytes is not json serializable #13455

hexylena opened this issue Feb 28, 2022 · 0 comments

Comments

@hexylena
Copy link
Member

Steps to reproduce

  • On the EMC's internal galaxy, or UseGalaxy.eu, or another 21.09 server
  • Use the biomart tool
  • select ensembl genes 105
  • select human genes
  • maybe add filters → gene → limit to external reference (gene names) and symbol BRCA1
  • results tab at top
  • send to galaxy
  • Go!

On the server side I see

Traceback (most recent call last):
  File "/srv/galaxy/server/lib/galaxy/tools/__init__.py", line 1760, in handle_single_execution
    rval = self.execute(
  File "/srv/galaxy/server/lib/galaxy/tools/__init__.py", line 1858, in execute
    return self.tool_action.execute(self, trans, incoming=incoming, set_output_hid=set_output_hid, history=history, **kwargs)
  File "/srv/galaxy/server/lib/galaxy/tools/actions/__init__.py", line 552, in execute
    self._record_inputs(trans, tool, job, incoming, inp_data, inp_dataset_collections)
  File "/srv/galaxy/server/lib/galaxy/tools/actions/__init__.py", line 761, in _record_inputs
    for name, value in tool.params_to_strings(incoming, trans.app).items():
  File "/srv/galaxy/server/lib/galaxy/tools/__init__.py", line 1869, in params_to_strings
    return params_to_strings(self.inputs, params, app, nested)
  File "/srv/galaxy/server/lib/galaxy/tools/parameters/__init__.py", line 215, in params_to_strings
    rval[key] = value if nested or value is None else str(dumps(value, sort_keys=True))
  File "/usr/lib/python3.8/json/__init__.py", line 234, in dumps
    return cls(
  File "/usr/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type bytes is not JSON serializable
nsoranzo added a commit to nsoranzo/galaxy that referenced this issue Apr 28, 2022
Fix the error reported in galaxyproject#13455 ,
which was due to BioMart sending some binary empty strings as values, e.g. for
the `hsapiens_gene_ensembl__filter.chromosomal_region__file` key.

N.B.: the BioMart tool still doesn't work after this fix (probably BioMart's fault), but
at least Galaxy doesn't fail with the mysterious:
"Error executing tool id 'biomart': Object of type bytes is not JSON serializable"
nsoranzo added a commit to nsoranzo/galaxy that referenced this issue Apr 28, 2022
Fix the error reported in galaxyproject#13455 ,
which was due to BioMart sending some binary empty strings as values, e.g. for
the `hsapiens_gene_ensembl__filter.chromosomal_region__file` key.

N.B.: the BioMart tool still doesn't work after this fix (probably BioMart's fault), but
at least Galaxy doesn't fail with the mysterious:
"Error executing tool id 'biomart': Object of type bytes is not JSON serializable"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant