EBI-Metagenomics / genome_uploader

Python script to upload bins and MAGs to ENA (European Nucleotide Archive)
Apache License 2.0
20 stars 3 forks source link

json error #7

Closed SilasK closed 1 year ago

SilasK commented 1 year ago

I think I have the latest version.

and got this error:

File "/gpfs/home/rdkiesersi1/upload_genomes/scripts/genome_upload.py", line 573, in get_run
    run = json.loads(response.text)[0]
KeyError: 0`

the response.text corresponds to {"timestamp":1675948565962,"status":401,"error":"Unauthorized","message":"Authentication failed.","path":"/ena/portal/api/search"}

This error message should be handled better.

The reson seems that I mixed password and username.

Ge94 commented 1 year ago

Hi Silas, Thanks for bringing this up! I have approved your PR and merged this into the main branch. I am also pushing changes for the edits you discussed with my colleague. Cheers