update dataportalapi.py to deal with 404