cBioPortal / oncotree

Creative Commons Attribution 4.0 International
35 stars 26 forks source link

AttributeError: module 'urllib' has no attribute 'urlopen' #230

Open nroak opened 3 years ago

nroak commented 3 years ago

When I download the tool and run it on my base conda environment, I'm getting the following error.

python oncotree_to_oncotree.py -i disease_code.oncotree.txt -o disease_code.oncotree.new.txt -s oncotree_2018_05_01 -t oncotree_2020_10_01
Traceback (most recent call last):
  File "oncotree_to_oncotree.py", line 587, in <module>
    main()
  File "oncotree_to_oncotree.py", line 576, in main
    source_oncotree_version_release_date, target_oncotree_version_release_date = validate_and_fetch_oncotree_version_release_dates(source_version, target_version, oncotree_api_url_base)
  File "oncotree_to_oncotree.py", line 72, in validate_and_fetch_oncotree_version_release_dates
    oncotree_versions_list = fetch_oncotree_versions(oncotree_api_url_base)
  File "oncotree_to_oncotree.py", line 52, in fetch_oncotree_versions
    response = urllib.urlopen(oncotree_version_endpoint_url)
AttributeError: module 'urllib' has no attribute 'urlopen'

Here is my environment:

Python 3.7.3 (default, Mar 27 2019, 22:11:17) 
[GCC 7.3.0] :: Anaconda, Inc. on linux

Some online search points to updates to the code.