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

Bug: Box API might fail and cause the get_data to fail #216

Open
astrochun opened this issue Jun 3, 2021 · 0 comments
Open

Bug: Box API might fail and cause the get_data to fail #216

astrochun opened this issue Jun 3, 2021 · 0 comments
Labels
api Use of a third-party API bug Something isn't working curation Pertains to aspects of curation, including workflow management p3 Tier-3 issues (lowest level) - will be addressed

Comments

@astrochun
Copy link
Contributor

Describe the bug

Just today I was attempting to run get_data and there was an issue saving the curation review report template.
It appeared that Box API was temporarily down.

Recommended solution: Do a try/except for up to three times.

Reproduction Steps

Hard to reproduce as this is an external API, but below is the message.

Outputted Messages

16:19:55 -     INFO: Saving as : ReDATA-DepositReview_Heidi_Harley-****_****_v1.docx
Traceback (most recent call last):
  File "/home/curator/codes/LD_Cool_P/ldcoolp/scripts/prereq_script", line 98, in <module>
    log=log, config_dict=config_dict)
  File "/home/curator/codes/LD_Cool_P/ldcoolp/curation/main.py", line 166, in workflow
    pw.download_report()
  File "/home/curator/codes/LD_Cool_P/ldcoolp/curation/main.py", line 125, in download_report
    log=self.log)
  File "/home/curator/codes/LD_Cool_P/ldcoolp/curation/reports.py", line 48, in review_report
    urlretrieve(report_url, out_file)
  File "/opt/anaconda3/envs/curation/lib/python3.7/urllib/request.py", line 247, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/opt/anaconda3/envs/curation/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/anaconda3/envs/curation/lib/python3.7/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/opt/anaconda3/envs/curation/lib/python3.7/urllib/request.py", line 641, in http_response
    'http', request, response, code, msg, hdrs)
  File "/opt/anaconda3/envs/curation/lib/python3.7/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/opt/anaconda3/envs/curation/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/opt/anaconda3/envs/curation/lib/python3.7/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 502: Bad Gateway

Version information
This issue is version independent

Expected behavior

Screenshots

Additional context

Implemented in: TBD

@astrochun astrochun added bug Something isn't working api Use of a third-party API curation Pertains to aspects of curation, including workflow management p1 Issues affecting production, multiple users labels Jun 3, 2021
@astrochun astrochun added p3 Tier-3 issues (lowest level) - will be addressed and removed p1 Issues affecting production, multiple users labels Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Use of a third-party API bug Something isn't working curation Pertains to aspects of curation, including workflow management p3 Tier-3 issues (lowest level) - will be addressed
Projects
None yet
Development

No branches or pull requests

1 participant