rest-api-fuzz-testing icon indicating copy to clipboard operation
rest-api-fuzz-testing copied to clipboard

Deployment Fails with "Invalid start byte" error

Open alfonso-mireles opened this issue 3 years ago • 8 comments

Deployment fails as so: python .\raft.py service deploy 'utf-8' codec can't decode byte 0xa0 in position 69: invalid start byte

Using: Python 3.9.5 azure-cli 2.27.1 Raft 4.1

I have deployed in Cloud Shell. But locally if fails without further info

alfonso-mireles avatar Aug 18 '21 13:08 alfonso-mireles

@alfonso-mireles

Can you share which operating system are you using ?

stishkin avatar Aug 23 '21 16:08 stishkin

@alfonso-mireles for the cloudshell deployment failure, did you use the bash or powershell environment?

mgreisen avatar Aug 24 '21 16:08 mgreisen

Also please be sure when editing the defaults.json file to save the file in plain ascii mode. We have seen some editors insert non-visible characters into the file.

mgreisen avatar Aug 24 '21 22:08 mgreisen

@stishkin Windows 10 @mgreisen Cloudshell deployment succeeded. It is local CLI that fails. I have edited defaults.json with several editors. Vscode, Nano. Also tried in Both Powershell CLI and cmd

alfonso-mireles avatar Aug 26 '21 10:08 alfonso-mireles

@alfonso-mireles

Could you try the following

in your raft.py file

on line 118 add encoding parameter as follows

        with open(defaults_path, 'w', encoding='utf-8') as d:
            d.write(fresh_defaults)
        print(defaults_help)

Delete existing defatuls.json file and try to create a fresh deployment

stishkin avatar Aug 26 '21 17:08 stishkin

Two questions for you.

  1. Are you using a non-english language pack on your machine?
  2. Would you be willing to show us a binary hex view of your defaults.json file? If you are willing, you can
  • mask the subscription id
  • Install the Hex Editor extension in VSCode
  • Open the defaults.json file with the Hex Editor
  • Share the results with us.

That may help us understand what's going on.

mgreisen avatar Aug 26 '21 19:08 mgreisen

Yes I am indeed using a non-english language pack How exactly do you want me to share the results here?

alfonso-mireles avatar Sep 24 '21 11:09 alfonso-mireles

Hmmm. When I tested using a different language pack I didn't run into the issue. Were you able to try Stas's solution?

mgreisen avatar Sep 24 '21 17:09 mgreisen