https://github.com/Esri/portalpy/blob/964e31c53c8e9ec501d844d81df683ddafd61ad3/portalpy.py#L280 only checks for status 'success'; portal will sometimes return status 'processing' and you have to poll until it completes
portalpy/portalpy.py
Line 280 in 964e31c