Cyclenerd / google-cloud-pricing-cost-calculator

💸 Calculate estimated monthly costs of Google Cloud Platform products and resources via YAML files and CLI program (Linux, macOS, Windows)
https://gcloud-compute.com/gcosts.html
Apache License 2.0
137 stars 23 forks source link

Yaml: unmarshal errors #194

Closed logicvenu closed 3 months ago

logicvenu commented 4 months ago

Describe the bug I tried to run 'gcosts calc' and get the error. 'Yaml: unmarshal errors', enclosed error screenshot, I tried doing the YAML validation it didn't work.

To Reproduce Steps to reproduce the behavior:

  1. Go to cmd prompt
  2. type gcosts calc
  3. Scroll down to '....'
  4. See error

Expected behavior Require the correct validated pricing .yml file to run gcosts calc.

Screenshots image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Cyclenerd commented 4 months ago

It looks to me as if the price list (pricing.yml) is in the same folder. Please see Warning and info message in Error.

logicvenu commented 4 months ago

As suggested, I did placed pricing.yml file in the separate folder (C:\Users\venug\Costs\Files) and tried,

gcosts calc --dir C:\Users\venug\Costs --pricing C:\Users\venug\Costs\Files\

image

Please let me know what needs to be done.

Cyclenerd commented 4 months ago

The parameter --pricing must specify the file with the pricing and not the folder. Please also see the README: https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator?tab=readme-ov-file#3-run-it

logicvenu commented 4 months ago

At last I was able to overcome the error "unmarshal errors".

gcosts calc --dir C:\Users\venug\Costs --pricing C:\Users\venug\Costs\Files\pricing.yml

image

Created the excel file with no information.

Also when I executed gcosts region, I get the error.

image

costs.csv

Cyclenerd commented 4 months ago

The error message indicates that the pricing.yml file is not at the specified location.