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

Validate the environment parameter #18

Open
aaclan-ebi opened this issue Apr 2, 2019 · 0 comments
Open

Validate the environment parameter #18

aaclan-ebi opened this issue Apr 2, 2019 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@aaclan-ebi
Copy link

aaclan-ebi commented Apr 2, 2019

Step to reproduce:

Run the tool with incorrect environment keyword.
$ analyze-submission -d int 5c9b50a6436bf1000897212c

Expected Behavior:
Let the user know the allowed arguments/parameters

Actual Behavior:
Unhandled exception

Stacktrace:

(metadata-schema) C02X488AJHD2:metadata-schema zina$
Using deployment: int

PHASE 1: Get submission primary bundle list from Ingest:
    Retrieving submission...Traceback (most recent call last):
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/anaconda3/envs/metadata-schema/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x10f41f320>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.ingest.int.data.humancellatlas.org', port=443): Max retries exceeded with url: /submissionEnvelopes/5c9b50a6436bf1000897212c (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10f41f320>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/anaconda3/envs/metadata-schema/bin/analyze-submission", line 677, in <module>
    AnalyzeSubmission()
  File "/anaconda3/envs/metadata-schema/bin/analyze-submission", line 592, in __init__
    self._get_submission_project_and_primary_bundle_list_from_ingest()
  File "/anaconda3/envs/metadata-schema/bin/analyze-submission", line 650, in _get_submission_project_and_primary_bundle_list_from_ingest
    submission = finder.find(f"subm_id={self.state.submission_id}")
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/dcp_diag/finders/ingest_finder.py", line 27, in find
    return SubmissionEnvelope.load_by_id(submission_id=field_value, ingest_api_agent=self.ingest)
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/dcp_diag/component_entities/ingest_entities.py", line 67, in load_by_id
    data = ingest_api_agent.get(f"/submissionEnvelopes/{submission_id}")
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/dcp_diag/component_agents/hateoas_agent.py", line 52, in get
    response = requests.get(url, headers=self.headers)
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/anaconda3/envs/metadata-schema/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.ingest.int.data.humancellatlas.org', port=443): Max retries exceeded with url: /submissionEnvelopes/5c9b50a6436bf1000897212c (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10f41f320>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant