Forum Archive

Module pygal.maps.world can’t be imported

An0therUsername

Hi there,

I am running into an issue trying to from pygal.maps.world import World. I installed both pygal and pygal.maps.world via Stash and both are visible in the modules folder in Pythonista.

Any idea why the module can’t be found or what I am missing?

Thanks

cvp

@An0therUsername Try

from pygal_maps_world.maps import World
cvp

@An0therUsername this works

from pygal_maps_world.maps import World

worldmap_chart = World()
worldmap_chart.title = 'Some countries'
worldmap_chart.add('F countries', ['fr', 'fi'])
worldmap_chart.render_to_file('chart.svg')

An0therUsername

Brilliant. That worked, thank you!