vast-ai / vast-python

Vast.ai python and cli api client
MIT License
117 stars 44 forks source link

Corrected string format (ID -> id) #68

Closed codeananda closed 8 months ago

codeananda commented 9 months ago

Line 1031 (create instance command) led to string formatting errors due to capitalised ID var

Original

url = apiurl(args, "/asks/{ID}/".format(id=args.ID))

Gave the following error (running on Windows)

Traceback (most recent call last):
  File "C:\Users\User\Documents\1 Projects\tonic_thematic_analysis\vast.py", line 2878, in <module>
    main()
  File "C:\Users\User\Documents\1 Projects\tonic_thematic_analysis\vast.py", line 2864, in main
    sys.exit(args.func(args) or 0)
  File "C:\Users\User\Documents\1 Projects\tonic_thematic_analysis\vast.py", line 1031, in create__instance
    url = apiurl(args, "/asks/{ID}/".format(id=args.ID))
KeyError: 'ID'

Corrected (to be in-line with other similar lines throughout vast.py)

url = apiurl(args, "/asks/{id}/".format(id=args.ID))
nickgreenspan commented 9 months ago

This should be fixed with PR #69, let me know if not.