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 Report #148

Open
neverland-haha opened this issue Dec 24, 2022 · 1 comment
Open

Bug Report #148

neverland-haha opened this issue Dec 24, 2022 · 1 comment
Labels
api Related to the Mapillary API

Comments

@neverland-haha
Copy link

Describe the bug
I can use mly.interface.images_in_bbox in api colab, however, when I try to use this api on my local machine,it returns HTTPSConnectionPool(host='tiles.mapillary.com', port=443): Max retries exceeded with url. Perhaps Chinese ban the port or any other reason?

Colab demo result
image
To Reproduce

local machine result.
image

Screenshots
image
To Reproduce

local machine code

import mapillary as mly
import geopandas as gpd
import os
import requests
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36'}
os.environ['HTTP_PROXY'] = 'http://127.0.0.1:33210'
os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:33210'
mly.interface.set_access_token('MLY|5175886149161658|4099af83a040b4c64a3891bdcc8314cf')
region_dict =  {
     'west': 8.97291281111626,
     'south': 35.35651235634347,
     'east': 9.09945112532228,
     'north': 35.460110419672326
}
result = mly.interface.images_in_bbox(test_dict)

colab demo

import mapillary as mly
import geopandas as gpd
import os
import requests
mly.interface.set_access_token('MLY|5175886149161658|4099af83a040b4c64a3891bdcc8314cf')
region_dict =  {
     'west': 8.97291281111626,
     'south': 35.35651235634347,
     'east': 9.09945112532228,
     'north': 35.460110419672326
}
result = mly.interface.images_in_bbox(region_dict)
@neverland-haha neverland-haha added the bug Something isn't working label Dec 24, 2022
@Rubix982
Copy link
Contributor

Your local machine's internet access blocks your request and thus your connection with the API service, hence the 443 error.

Using the os.environ variables as you have set don't really have much impact. In the end, the local network address you are on is 127.0.0.1. It is rather the internet service you are connected to that does not let your machine send a request to the API service. Nothing to be fixed via the code here.

@Rubix982 Rubix982 added api Related to the Mapillary API and removed bug Something isn't working labels Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the Mapillary API
Projects
None yet
Development

No branches or pull requests

2 participants