Skip to content

[Feature Request] Add proxy support #151

Description

@LaoshuBaby

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions