Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't have names with uppercase letters #52

Closed
jessjaco opened this issue May 30, 2023 · 3 comments · Fixed by #79
Closed

Can't have names with uppercase letters #52

jessjaco opened this issue May 30, 2023 · 3 comments · Fixed by #79

Comments

@jessjaco
Copy link

This works:

kbatch job submit --name=list-files --command='["ls", "-lh"]' --image=alpine

but any name with uppercase letters gives an error. For example:
kbatch job submit --name=List-files --command='["ls", "-lh"]' --image=alpine

gives

[12:51:57] INFO     HTTP Request: POST https://pccompute.westeurope.cloudapp.azure.com/compute/services/kbatch/jobs/ "HTTP/1.1 500 Internal Server Error"     _client.py:1013
Traceback (most recent call last):
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/bin/kbatch", line 8, in <module>
    sys.exit(cli())
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/lib/python3.10/site-packages/kbatch/cli.py", line 281, in submit_job
    result = _core.submit_job(
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/lib/python3.10/site-packages/kbatch/_core.py", line 170, in submit_job
    return _request_action(kbatch_url, token, "POST", model, json_data=data)
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/lib/python3.10/site-packages/kbatch/_core.py", line 119, in _request_action
    logger.exception(r.json())
  File "/home/jesse/.cache/pypoetry/virtualenvs/validator-ZACCxrgy-py3.10/lib/python3.10/site-packages/httpx/_models.py", line 756, in json
    return jsonlib.loads(self.text, **kwargs)
  File "/home/jesse/miniconda3/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/home/jesse/miniconda3/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/jesse/miniconda3/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@jessjaco
Copy link
Author

Underscores appear to have the save problem

@jessjaco
Copy link
Author

jessjaco commented Sep 8, 2023

Get same problem when passing args that are numbers (quoting them works)

@jbusecke
Copy link

jbusecke commented Aug 6, 2024

Just ran into the same issue here. Is there a way we wan replace incompatible characters automatically or raise a more user friendly error message?

(cc @yuvipanda)

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

Successfully merging a pull request may close this issue.

2 participants