RhinoCompute client side error reading .gh script

when sending a grasshopper script saved as “.gh” to rhinocompute, it complains as follows:

Traceback (most recent call last):
  File "c:\dev\_TDA\tda_rh_compute_tests_suite\gh_cloud_py\bridges_bim_model.py", line 47, in <module>
    output = gh.EvaluateDefinition(gh_file, input_tree)
  File "c:\dev\_TDA\tda_rh_compute_tests_suite\.venv\lib\site-packages\compute_rhino3d\Grasshopper.py", line 51, in EvaluateDefinition
    definition = ghx.read()
  File "C:\Python\Python38\lib\codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
  File "C:\Python\Python38\lib\encodings\utf_8_sig.py", line 69, in _buffer_decode
    return codecs.utf_8_decode(input, errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd4 in position 0: invalid continuation byte

Once saved as “.ghx” it works fine but the ghx file size is almost 30 times bigger. Any ideas as to why it doesn’t work as “.gh”?