Giter VIP home page Giter VIP logo

Comments (6)

tcassou avatar tcassou commented on July 28, 2024

Hi @dakmatt,
Thanks for sharing, I tried to reproduce with the following data based on your screenshot:

df = pd.DataFrame(
    [
        ["JUMLAH", 790136, np.nan, np.nan],
        ["ALOR GAJAH", 173712, 2.382211, 102.211561],
        ["Ayer Pa'Abas", 2644, 2.396907, 102.166641],
    ],
    columns=['label', 'size', 'latitude', 'longitude'],
)

mplt.plot_markers(df)

and it worked... except for the fact that the NaN values lead to a weird marker on the map, I'll add that improvement to the backlog:
image

Could you share more so that I can reproduce your error?
I believe it is due to an unsuccessful query to Google APIs, which then return a wrong string (not an image basically) and Pillow fails to load it. Can't be 100% sure given the context though.

If I can reproduce it, I'm more than happy to add some verbose to the error, I acknowledge it's not very helpful at the moment!

Hope it helps,

Thomas

from mapsplotlib.

tcassou avatar tcassou commented on July 28, 2024

Added this issue to the board #4

from mapsplotlib.

tcassou avatar tcassou commented on July 28, 2024

Any luck @dakmatt ?

from mapsplotlib.

rudolfbyker avatar rudolfbyker commented on July 28, 2024

I can confirm that this happens when Google sends a "403" response code. For me, it meant that I forgot to enable the "static maps" API.

from mapsplotlib.

tcassou avatar tcassou commented on July 28, 2024

Ok thanks @rudolfbyker, I'll add some logic to handle the response codes.

from mapsplotlib.

tcassou avatar tcassou commented on July 28, 2024

I released version 1.0.6 on pypi with HTTP error handling, it should prevent this issue in the future.
Thanks for reporting!

from mapsplotlib.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.