[FIXED] - Sudden BlobMedia parameter-type troubles

Posting here in response as it appears related - I’ve just resolved a similar issue with BlobMedia that was working a couple of days ago but fell over this morning

Server-side - uplink (python 3.7.7 ):

import os
def write_text_file():
    .... *lines of text strings*
    f = io.StringIO()
    f.writelines(line1, line2, line3)
    contents = f.getvalue().encode()
    text_file = anvil.BlobMedia(content_type="text/plain", contents=contents, name="text_file.txt"

Client-side
This is what was working previously:

text_file = anvil.server.call('write_text_file')
text_strings = text_file.get_bytes()

and the correction to make it work as of Nov 14

text_strings = text_file.get_bytes().decode() 

It appears something might have changed to affect .get_bytes() on the client side.

Where I was previously receiving text_strings from the server call with no problems, whatever changed mean that I was receiving a bunch of comma-separated integers. It dawned on me that I might be looking at the binary encoded version; in short .decode() did the trick.