Hi everyone! I'm trying to follow the "Deploying ...
# ask-the-community
r
Hi everyone! I'm trying to follow the "Deploying Workflows - Registration" doc here: https://docs.flyte.org/projects/cookbook/en/stable/auto/deployment/deploying_workflows.html I've built the docker image that contains my code. I'm trying to serialize it with pyflyte. I'm running the following command:
Copy code
pyflyte -c /root/.flyte/config.yaml --pkgs delaine serialize --in-container-config-path /root/config.yaml --local-source-root ./ --image delaieine:2 workflows -f _pb_output/
And getting the following error traceback:
Copy code
Traceback (most recent call last):
 File "/root/delaieine/bin/pyflyte", line 8, in <module>
  sys.exit(main())
 File "/root/delaieine/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
  return self.main(*args, **kwargs)
 File "/root/delaieine/lib/python3.9/site-packages/click/core.py", line 1055, in main
  rv = self.invoke(ctx)
 File "/root/delaieine/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
 File "/root/delaieine/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
 File "/root/delaieine/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
  return ctx.invoke(self.callback, **ctx.params)
 File "/root/delaieine/lib/python3.9/site-packages/click/core.py", line 760, in invoke
  return __callback(*args, **kwargs)
 File "/root/delaieine/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
  return f(get_current_context(), *args, **kwargs)
 File "/root/delaieine/lib/python3.9/site-packages/flytekit/clis/sdk_in_container/serialize.py", line 139, in workflows
  serialize_all(
 File "/root/delaieine/lib/python3.9/site-packages/flytekit/exceptions/scopes.py", line 160, in system_entry_point
  return wrapped(*args, **kwargs)
 File "/root/delaieine/lib/python3.9/site-packages/flytekit/clis/sdk_in_container/serialize.py", line 60, in serialize_all
  image_config=ImageConfig.auto(config_file, img_name=image),
 File "/root/delaieine/lib/python3.9/site-packages/flytekit/configuration/__init__.py", line 250, in auto
  for k, v in _internal.Images.get_specified_images(config_file).items()
 File "/root/delaieine/lib/python3.9/site-packages/flytekit/configuration/internal.py", line 25, in get_specified_images
  image_names = cfg.legacy_config.options("images")
AttributeError: 'NoneType' object has no attribute 'options'
NoneType leads me to believe it's not liking either the config or the docker image. I've checked the image/tag spelling. That's fine. The config exists, the path is right, and it looks like this:
Copy code
admin:
 # For GRPC endpoints you might want to use dns:///flyte.myexample.com
 endpoint: localhost:30081
 authType: Pkce
 insecure: true
I'm using flytekit=1.0.2 and flytectl=0.5.25 I'm not sure how to troubleshoot this. Any help would be much appreciated!
y
very sorry
this is a bug in flytekit’s attempt to handle both the .ini style of config file that is Python’s default, as well as the yaml style config that is shared with the
flytectl
tool.
some configuration entries though don’t make sense to have in the yaml file - image is one of them. the reason is that this is something that is set at compilation time (when your code is serialized into protobuf)
so we should just exclude that here.
cc @Eduardo Apolinario (eapolinario)
r
Just to be clear, by "excluding that here" you mean not giving pyflyte a config at all correct? So no -c and no --in-container-config-path?
y
oh no sorry
gimme a bit
okay - patched into this version. would you mind bumping the version and trying again please? sorry for the bug.
👍 1
r
@Yee Will do! Thank you!
@Yee This worked! Thanks so much!
❤️ 1
166 Views