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

Invalid value for name, must not be None #20

Open
tsadoklf opened this issue Feb 28, 2020 · 3 comments
Open

Invalid value for name, must not be None #20

tsadoklf opened this issue Feb 28, 2020 · 3 comments

Comments

@tsadoklf
Copy link

Running the example code I keep getting Invalid value for name, must not be None

File "index.py", line 19, in <module>
    ret = handler.handle(st)
  File "/home/app/function/handler.py", line 106, in handle
    api_instance.create_namespaced_workflow(namespace, manifest)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api/v1alpha1_api.py", line 263, in create_namespaced_workflow
    (data) = self.create_namespaced_workflow_with_http_info(namespace, body, **kwargs)  # noqa: E501
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api/v1alpha1_api.py", line 330, in create_namespaced_workflow_with_http_info
    return self.api_client.call_api(
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 325, in call_api
    return self.__call_api(resource_path, method,
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 169, in __call_api
    return_data = self.deserialize(response_data, response_type)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 241, in deserialize
    return self.__deserialize(data, response_type)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 280, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 624, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 280, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 624, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 257, in __deserialize
    return [self.__deserialize(sub_data, sub_kls)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 257, in <listcomp>
    return [self.__deserialize(sub_data, sub_kls)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 280, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 624, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 280, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/app/.local/lib/python3.8/site-packages/argo/workflows/client/api_client.py", line 626, in __deserialize_model
    instance = klass(**kwargs)
  File "/home/app/.local/lib/python3.8/site-packages/kubernetes/client/models/v1_container.py", line 125, in __init__
    self.name = name
  File "/home/app/.local/lib/python3.8/site-packages/kubernetes/client/models/v1_container.py", line 356, in name
    raise ValueError("Invalid value for `name`, must not be `None`")
ValueError: Invalid value for `name`, must not be `None`
@yxue-kabam
Copy link

Hello, if you have specified the V1Container in your code, please make sure it has a name attr set (even if it's empty str). K8s swagger API requires it so.

V1Container(
    name='',
    image='alpine:latest',
    command=['sh', '-c'],
    args=['echo intentional failure; exit 1'])

@pkrishn6
Copy link

@tsadoklf : set Status: {} as well.

Ref:#15

@pkrishn6
Copy link

This is duplicate of : #11

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

No branches or pull requests

3 participants