Skip to content

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

@nroak

Description

@nroak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions