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

hca dss put-bundle --files argument error #391

Open
jeffrey856 opened this issue Jul 16, 2019 · 3 comments
Open

hca dss put-bundle --files argument error #391

jeffrey856 opened this issue Jul 16, 2019 · 3 comments
Assignees
Labels

Comments

@jeffrey856
Copy link

When attempting to run
hca dss put-bundle --creator-uid 0 --uuid fff54b87-26fe-42a9-be54-3f5a7ef8176e --version 2019-03-26T131455.775610Z --replica aws --files '[{"uuid": "258080d4-1c7b-4a82-a95a-8842d9588618","version":"2019-02-26T195643.678045Z","name":"SRR6575901_2.fastq.gz","indexed":"False"}]'' --creator-uid 0

I ran into the error:

Traceback (most recent call last):
  File "/home/jeff/.local/bin/hca", line 10, in <module>
    sys.exit(main())
  File "/home/jeff/.local/lib/python3.6/site-packages/hca/cli.py", line 138, in main
    result = parsed_args.entry_point(parsed_args)
  File "/home/jeff/.local/lib/python3.6/site-packages/hca/util/__init__.py", line 200, in _cli_call
    return self._consume_response(self._request(vars(cli_args)))
  File "/home/jeff/.local/lib/python3.6/site-packages/hca/util/__init__.py", line 185, in _request
    raise SwaggerAPIException(response=res)
hca.util.exceptions.SwaggerAPIException: illegal_arguments: [{'uuid': '258080d4-1c7b-4a82-a95a-8842d9588618', 'version': '2019-02-26T195643.678045Z', 'name': 'SRR6575901_2.fastq.gz', 'indexed': 'False'}] is not of type 'object' (HTTP 400). Details:
Traceback (most recent call last):
  File "/var/task/chalicelib/dss/__init__.py", line 155, in wrapper
    return origwrapper(request)
  File "/opt/python/lib/python3.6/site-packages/connexion/decorators/validation.py", line 159, in wrapper
    error = self.validate_schema(data, request.url)
  File "/var/task/chalicelib/dss/__init__.py", line 146, in validate_schema
    raise DSSBindingException(result.body['detail'])
dss.error.DSSBindingException

It seems to trying to load() the input initially which turns it into a dictionary from a string. It then tries make sure it is an object from the swagger validation using that string.

@DailyDreaming
Copy link
Contributor

DailyDreaming commented Jul 16, 2019

Your command has --creator-uid 0 twice and two single quotes where there should be one near the end of the command: "indexed":"False"}]'' --creator-uid 0. That said, giving a modified command still gives the message: is not of type 'object' (HTTP 400).

That input definitely sounds like a bug. @jeffrey856 Do you think you can fix it?

@jeffrey856
Copy link
Author

I will take this issue up!

@natanlao
Copy link
Contributor

hca dss put-bundle --creator-uid 0 --uuid fff54b87-26fe-42a9-be54-3f5a7ef8176e --version 2019-03-26T131455.775610Z --replica aws --files '{"uuid": "258080d4-1c7b-4a82-a95a-8842d9588618","version":"2019-02-26T195643.678045Z","name":"SRR6575901_2.fastq.gz","indexed":false}' works for me. I think that you specify multiples files not as objects in a json array but individually as arguments to --files.

@kozbo kozbo added this to the Q3 2019 Milestone 2 milestone Jul 31, 2019
@kozbo kozbo added the BUG label Aug 7, 2019
@Bento007 Bento007 modified the milestones: Q3 2019 Milestone 3, Q4 2019 Milestone 3 Sep 25, 2019
@theathorn theathorn modified the milestones: Q4 2019 Milestone 3, Q4 2019 Milestone 1 Sep 26, 2019
@melainalegaspi melainalegaspi modified the milestones: Q4 2019 Milestone 1, Q4 2019 Milestone 2 Oct 28, 2019
@theathorn theathorn modified the milestones: Q4 2019 Milestone 2, Q4 2019 Milestone 3 Nov 20, 2019
@theathorn theathorn removed this from the Q4 2019 Milestone 3 milestone Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants