oncokb / oncokb-annotator

Annotates variants in MAF with OncoKB annotation.
GNU Affero General Public License v3.0
121 stars 59 forks source link

TypeError: __init__() got an unexpected keyword argument 'allowed_methods' #185

Open douglas-hoen opened 2 years ago

douglas-hoen commented 2 years ago

Hi,

I'm getting the following error trying to run MafAnnotator on the example files. I've successfully run it before. Looks like maybe it's having trouble connecting and then executing code that doesn't work? Latest version.

Thanks.

python MafAnnotator.py -i data/example_maf.txt -o example_maf.oncokb.txt -c data/example_clinical.txt -b <TOKEN>
INFO:MafAnnotator:annotating data/example_maf.txt ...
INFO:AnnotatorCore:Your OncoKB API token is valid and will expire on 2023-01-03 07:01:00 UTC
Traceback (most recent call last):
  File "MafAnnotator.py", line 137, in <module>
    args.func(args)
  File "MafAnnotator.py", line 113, in main
    processalterationevents(argv.input_file, argv.output_file, argv.previous_result_file, argv.default_cancer_type,
  File "AnnotatorCore.py", line 507, in processalterationevents
    process_alteration(reader, outf, headers, [HGVSP_SHORT_HEADER, ALTERATION_HEADER], ncols, newncols,
  File "AnnotatorCore.py", line 638, in process_alteration
    annotations = pull_protein_change_info(queries, annotatehotspots)
  File "AnnotatorCore.py", line 1526, in pull_protein_change_info
    response = makeoncokbpostrequest(url, queries)
  File "AnnotatorCore.py", line 327, in makeoncokbpostrequest
    return requests_retry_session(allowed_methods=["POST"]).post(url, headers=headers,
  File "AnnotatorCore.py", line 308, in requests_retry_session
    retry = Retry(
TypeError: __init__() got an unexpected keyword argument 'allowed_methods'
zhx828 commented 1 year ago

Looking at a similar issue https://togithub.com/plamere/spotipy/issues/647, what versions of requests and urllib3 you use? @douglas-hoen