I dug into it and made a monkey patch that works with anvil server module.
Try this at the top of your server module code:
from osmnx import settings as osmnx_settings
osmnx_settings.cache_folder = "/tmp/cache"
make sure it is before:
import prettymaps
This prettymaps module takes forever to load, which makes a spinup for a server module painfully slow even before it tries to do anything.
The code you have will not complete within the requisite 30 second time limit for a server module, so I suggest you use a background task.
If you don’t know what that means, search the forums and/or start a new thread since it would be off topic in this question now.
/rambling on
Summary
Other suggestions would be to use uplink to have a script running that always has this super slow loading prettymaps module imported in memory, or using persistent server, but that would involve upgrading your plan which is not ideal if you are still in the basic development stage.
If you do get it working, it will be very slow, so you might want to lazy load the prettymaps module inside a function that calls it (so it does not make every function you use take forever to run), and possibly cashing these plots in a data table so if the same place is searched again you already have the plot to return instead of loading prettymaps again and again