I'm using ParsePy (https://github.com/milesrichardson/ParsePy) and now I'm having a problem with File delete.
from parse_rest.datatypes import Object, File
class GameScore(Object):
pass
with open('/path/to/screenshot.png', 'rb') as fh:
rawdata = fh.read()
screenshotFile = File('arbitraryNameOfFile', rawdata, 'image/png')
screenshotFile.save()
gs = GameScore.Query.get(objectId='xxxxxxx')
gs.screenshot = screenshotFile
gs.save()
#
# In another function
#
class GameScore(Object):
pass
gs = GameScore.Query.get(objectId='xxxxxxx')
gs.screenshot.delete()
# Error: No JSON object could be decoded
Any suggestion? Thanks in advance. Loris