Skip to content
This repository was archived by the owner on Feb 2, 2022. It is now read-only.

Deployment Fails with "Invalid start byte" error #232

Open
alfonso-mireles opened this issue Aug 18, 2021 · 8 comments
Open

Deployment Fails with "Invalid start byte" error #232

alfonso-mireles opened this issue Aug 18, 2021 · 8 comments

Comments

@alfonso-mireles
Copy link

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

@stishkin
Copy link
Contributor

@alfonso-mireles

Can you share which operating system are you using ?

@mgreisen
Copy link
Contributor

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

@mgreisen
Copy link
Contributor

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.

@alfonso-mireles
Copy link
Author

@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

@stishkin
Copy link
Contributor

stishkin commented Aug 26, 2021

@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

@mgreisen
Copy link
Contributor

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.

@alfonso-mireles
Copy link
Author

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

@mgreisen
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants