No node/attribute matches your request

My codes were working fine to replace an image and now i am getting this error when when the script attempts to extract the media ID from the library. Why is this, what would have changed?

Traceback (most recent call last):
File “D:\Google Drive\Thirlmere RFS\Community Education\Digital Displays\Xibo Python\ReplaceFDRImage.py”, line 182, in
mediaId = long(api.parseID(content, ‘media’))
File “D:\Google Drive\Thirlmere RFS\Community Education\Digital Displays\Xibo Python\XiboAPI.py”, line 218, in parseID
raise XiboAPIError(‘No node/attribute matches your request’)
XiboAPIError: ‘No node/attribute matches your request’

Perhaps your script expects something in the layout which has been deleted manually, or in a previous failed run?