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

urllib.error.HTTPError: HTTP Error 403: Forbidden #16

Open
seedlit opened this issue May 31, 2021 · 2 comments
Open

urllib.error.HTTPError: HTTP Error 403: Forbidden #16

seedlit opened this issue May 31, 2021 · 2 comments

Comments

@seedlit
Copy link

seedlit commented May 31, 2021

I am trying out the example as listed on the hompage
However, I am getting urllib.error.HTTPError: HTTP Error 403: Forbidden in line
fig = AnimationTrack(df_points=ibiza_trk, dpi=300, bg_map=True, map_transparency=0.5)

Does anyone know how to resolve this?

@iamhyc
Copy link

iamhyc commented Jun 21, 2021

UPDATE: well, I notice that this has already been solved in master branch (#8 ) and I have no idea why it is not published on PyPI.

This is solved in smopy==0.0.7.
As the dependency for trackanimation is specified with smopy==0.0.6, you can manually fix the fetch_tile function used in smopy as follows.

def fetch_tile(x, y, z):
    """Fetch tile (x, y) at zoom level z from OpenStreetMap's servers.

    Return a PIL image.

    """
    from six.moves.urllib.request import Request
    url = get_url(x, y, z)
    req = Request(url, data=None, headers={'User-Agent': 'smopy'})
    png = BytesIO(urlopen(req).read())
    img = Image.open(png)
    img.load()
    return img

@Khixinhxan
Copy link

FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'

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

3 participants