QuantConnect / QuantConnect/Lean
Improve Message for Forbidden External Request
Open
Nobody has claimed this yet.
feature
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
Expected Behavior
LEAN suggests using the Download method for GET requests.
Actual Behavior
When we use requests method, we receive the following error:
During the algorithm initialization, the following exception has occurred: HTTPSConnectionPool(host='api.factset.com', port=443): Max retries exceeded with url: /.well-known/oauth-authorization-server (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 403 Forbidden')))
Potential Solution
Parse that error and suggest using the Download.
Reproducing the Problem
from AlgorithmImports import *
import requests
class MyAlgorithm(QCAlgorithm):
def initialize(self):
response = requests.get('https://google.com')
System Information
QC Cloud.
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
- I have provided detailed steps to reproduce the issue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the initialize entry point in the provided Python reproduction and trace how the forbidden external-request exception is surfaced in QC Cloud. Reproduce the 403 proxy error, then identify the existing error-handling path; done means this case clearly suggests using Download without obscuring other request failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100