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

[Feature Request] Add proxy support #151

Open
LaoshuBaby opened this issue Apr 15, 2023 · 0 comments
Open

[Feature Request] Add proxy support #151

LaoshuBaby opened this issue Apr 15, 2023 · 0 comments

Comments

@LaoshuBaby
Copy link

LaoshuBaby commented Apr 15, 2023

Looks like python3.11 will use system proxy automatically, but 3.9 still won't. And this is a package, if it haven't got this feature, I can't just left a --proxy https://localhost:port in parameters like what I'll do when install with pip.

That's because openstreetmap.org get blocked in some region, for example, where I'm living, China. So I need to visit it pass a proxy.

Now when I run map-machine tile --tile 13/6744/3103 it will throw this error:

  File "C:\Environment\Python\Python39\lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.openstreetmap.org', port=443): Max retries exceeded with url: /api/0.6/map?bbox=116.366%2C39.909%2C116.412%2C39.944 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000260FFF842B0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time'))

I noticed that the author enzet seems to have no time to contribute to open source projects recently, so I am trying to solve this problem in my fork, but I guess original author's review may be needed before merge that PR. (Hope it's not Squash or Rebase

Thank you for taking the time to read this issue


Edit: I found the issue itself python/cpython#86793, and it was fixed in python/cpython#26307 (3.11)

LaoshuBaby added a commit to LaoshuBaby/map-machine that referenced this issue Apr 15, 2023
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

1 participant