Update Error

I have downloaded the zip file from github to update, and got this error


Error: unknown flag: --version
PS D:\fly> flyctl auth login
>>
Error loading config While parsing config: yaml: control characters are not allowed
Error: yaml: control characters are not allowed
PS D:\fly>

Please post your TOML file in this thread, using a Markdown code block. The error relates to that file.

This one, right?

app = "my_app"
primary_region = "hkg"

[build]

[deploy]
  command = "python App.py"

[http_service]        
  internal_port = 8080
  force_https = true        
  auto_stop_machines = "off"
  auto_start_machines = true
  min_machines_running = 1  
  processes = ["app"]       

[vm]
  memory = "2gb"
  cpu_kind = "shared"       
  cpus = 1
  

Yep, that one. It looks valid, so I’d guess that your text editor is adding Windows-encoded newlines, and it is upsetting the flyctl binary. Or maybe you’re using Git on Windows, and it is writing text files using that format when you do a checkout. I should think that Unix line endings would be the standard here.

this error is actually about the ~/.fly/config.yml file, though I don’t know off the top of my head why it would end up broken like this.
if it doesn’t have any obvious error, try deleting and recreating it (you’ll have to log in again)

2 Likes

Yes, that was the problem, I did reset it and my app now throws no error. >_<