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

bravado.exception.HPPTFound 302 #481

Open
DiyuanLu opened this issue Aug 22, 2022 · 1 comment
Open

bravado.exception.HPPTFound 302 #481

DiyuanLu opened this issue Aug 22, 2022 · 1 comment

Comments

@DiyuanLu
Copy link

machine: MacBook Pro M2
python: 3.9.5

I am new to cBioportal. When following the python client tutorial
from bravado.client import SwaggerClient cbioportal = SwaggerClient.from_url('https://www.cbioportal.org/api/api-docs', config={"validate_requests":False,"validate_responses":False,"validate_swagger_spec": False})
I got the following error.

bravado.exception.HTTPFound: 302

The following is the complete pip install logs and reproduced error.

(tensorflow) laptop:~ user$ pip install bravado
Collecting bravado
Downloading bravado-11.0.3-py2.py3-none-any.whl (38 kB)
Requirement already satisfied: typing-extensions in ./miniforge3/envs/tensorflow/lib/python3.9/site-packages (from bravado) (4.3.0)
Collecting bravado-core>=5.16.1
Downloading bravado_core-5.17.0-py2.py3-none-any.whl (67 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.5/67.5 kB 2.1 MB/s eta 0:00:00
Requirement already satisfied: pyyaml in ./miniforge3/envs/tensorflow/lib/python3.9/site-packages (from bravado) (6.0)
Requirement already satisfied: requests>=2.17 in ./miniforge3/envs/tensorflow/lib/python3.9/site-packages (from bravado) (2.28.1)
Requirement already satisfied: six in ./miniforge3/envs/tensorflow/lib/python3.9/site-packages (from bravado) (1.16.0)
Collecting msgpack
Downloading msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl (69 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 69.8/69.8 kB 2.3 MB/s eta 0:00:00
Requirement already satisfied: python-dateutil in ./miniforge3/envs/tensorflow/lib/python3.9/site-packages (from bravado) (2.8.2)
Collecting simplejson
Downloading simplejson-3.17.6-cp39-cp39-macosx_11_0_arm64.whl (73 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 73.6/73.6 kB 2.5 MB/s eta 0:00:00
Collecting monotonic
Downloading monotonic-1.6-py2.py3-none-any.whl (8.2 kB)
Collecting swagger-spec-validator>=2.0.1
Downloading swagger_spec_validator-2.7.4-py2.py3-none-any.whl (27 kB)
Collecting jsonref
Downloading jsonref-0.2-py3-none-any.whl (9.3 kB)
Requirement already satisfied: pytz in ./miniforge3/envs/tensorflow/lib/python3.9/site-packages (from bravado-core>=5.16.1->bravado) (2022.2.1)
Collecting jsonschema[format]>=2.5.1
Downloading jsonschema-4.14.0-py3-none-any.whl (82 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.4/82.4 kB 5.4 MB/s eta 0:00:00
Requirement already satisfied: charset-normalizer<3,>=2 in ./miniforge3/envs/tensorflow/lib/python3.9/site-packages (from requests>=2.17->bravado) (2.1.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./miniforge3/envs/tensorflow/lib/python3.9/site-packages (from requests>=2.17->bravado) (1.26.11)
Requirement already satisfied: idna<4,>=2.5 in ./miniforge3/envs/tensorflow/lib/python3.9/site-packages (from requests>=2.17->bravado) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in ./miniforge3/envs/tensorflow/lib/python3.9/site-packages (from requests>=2.17->bravado) (2022.6.15)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
Downloading pyrsistent-0.18.1-cp39-cp39-macosx_10_9_universal2.whl (81 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.4/81.4 kB 2.6 MB/s eta 0:00:00
Collecting attrs>=17.4.0
Downloading attrs-22.1.0-py2.py3-none-any.whl (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.8/58.8 kB 1.9 MB/s eta 0:00:00
Collecting webcolors>=1.11
Downloading webcolors-1.12-py3-none-any.whl (9.9 kB)
Collecting jsonpointer>1.13
Downloading jsonpointer-2.3-py2.py3-none-any.whl (7.8 kB)
Collecting uri-template
Downloading uri_template-1.2.0-py3-none-any.whl (10 kB)
Collecting rfc3987
Downloading rfc3987-1.3.8-py2.py3-none-any.whl (13 kB)
Collecting isoduration
Downloading isoduration-20.11.0-py3-none-any.whl (11 kB)
Collecting fqdn
Downloading fqdn-1.5.1-py3-none-any.whl (9.1 kB)
Collecting rfc3339-validator
Downloading rfc3339_validator-0.1.4-py2.py3-none-any.whl (3.5 kB)
Collecting arrow>=0.15.0
Downloading arrow-1.2.2-py3-none-any.whl (64 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.0/64.0 kB 2.2 MB/s eta 0:00:00
Installing collected packages: rfc3987, msgpack, monotonic, jsonref, webcolors, uri-template, simplejson, rfc3339-validator, pyrsistent, jsonpointer, fqdn, attrs, jsonschema, arrow, swagger-spec-validator, isoduration, bravado-core, bravado
Successfully installed arrow-1.2.2 attrs-22.1.0 bravado-11.0.3 bravado-core-5.17.0 fqdn-1.5.1 isoduration-20.11.0 jsonpointer-2.3 jsonref-0.2 jsonschema-4.14.0 monotonic-1.6 msgpack-1.0.4 pyrsistent-0.18.1 rfc3339-validator-0.1.4 rfc3987-1.3.8 simplejson-3.17.6 swagger-spec-validator-2.7.4 uri-template-1.2.0 webcolors-1.12
(tensorflow) laptop:~ user$ python
Python 3.9.5 | packaged by conda-forge | (default, Jun 19 2021, 00:24:55)
[Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from bravado.client import Swaggerclient
Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name 'Swaggerclient' from 'bravado.client' (/Users/user/miniforge3/envs/tensorflow/lib/python3.9/site-packages/bravado/client.py)
from bravado.client import SwaggerClient
cbioportal = SwaggerClient.from_url('https://www.cbioportal.org/api/api-docs', config={"validate_requests": False, "validate_responses": False, "validate_swagger_spec": False})
Traceback (most recent call last):
File "", line 1, in
File "/Users/user/miniforge3/envs/tensorflow/lib/python3.9/site-packages/bravado/client.py", line 98, in from_url
spec_dict = loader.load_spec(spec_url)
File "/Users/user/miniforge3/envs/tensorflow/lib/python3.9/site-packages/bravado/swagger_model.py", line 101, in load_spec
response = request(
File "/Users/user/miniforge3/envs/tensorflow/lib/python3.9/site-packages/bravado/http_future.py", line 282, in result
raise make_http_exception(response=incoming_response)
bravado.exception.HTTPFound: 302

@sjrothfuss
Copy link

I have the same issue in Python 3.9.12 on a MacBook Air M1. The same thing happens when I try to use cbio_py. Have you found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants