next_available_network works on network containers. Once the parent network is converted to a network container, you have to do the call on the new container, not on the old network that no longer exists.
@FHecker I am getting an error, file not found, when I try to run your script. I've confirmed that I have all of the modules installed and that the script is executable. Can you assist with some troubleshooting? Rodney