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

AttributeError: 'MultiPolygon' object has no attribute 'exterior' #113

Closed
antoninpa opened this issue Mar 1, 2023 · 3 comments
Closed

Comments

@antoninpa
Copy link

import prettymaps
from matplotlib import pyplot as plt

plot = prettymaps.plot(
    'Bom Fim, Porto Alegre, Brasil', radius = False,
)

plt.show()

This code fails and produces :

Traceback (most recent call last):
File "/home/.../prettymaps/Madrid.py", line 5, in
plot = prettymaps.plot(
File "/home/.../prettymaps/prettymaps/draw.py", line 951, in plot
plot_gdf(
File "/home/.../prettymaps/prettymaps/draw.py", line 247, in plot_gdf
PolygonPatch(
File "/home/.../prettymaps/prettymaps/draw.py", line 172, in PolygonPatch
exterior = np.array(poly.exterior.xy)
AttributeError: 'MultiPolygon' object has no attribute 'exterior'

@marceloprates
Copy link
Owner

Hi @antoninpa , are you sure you have prettymaps=1.0.0 installed? I couldn't reproduce your error neither on my local machine or Google Colab

@antoninpa
Copy link
Author

My bad, I had to reinstall my virtual env. Sorry !

@marceloprates
Copy link
Owner

No problem, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants