Report this

What is the reason for this report?

Using cartopy + digitalocean

Posted on November 6, 2019

I use cartopy in a python script to periodically generate images of earth and tweet them. My code to generate the image is essentially:

import matplotlib.pyplot as plt
import cartopy.crs as ccrs

ax = plt.axes(projection=ccrs.NearsidePerspective(central_longitude=long, central_latitude=lat, satellite_height=35785831/3))
ax.stock_img()
plt.savefig("earth.png")

If I run my code from my local Windows machine, the image is tweeted out correctly, whereas on digitalocean, it does not insert the stock image (from ax.stock_img(). The versions of cartopy should be identical, the image is on both machines in the same place.

I’m not sure if this is something the DO community can help with (I hope it is!) but has anyone encountered this before and if so – how do I rectify it?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello, @sric560

Can you check if all the requirements are also having the same versions? I haven’t used Cartopy personally but I know it has other dependencies apart from python (you can check the python version as well)

Let me know how it goes.

Regards, Alex

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.