Hi team, when I tried to use `python my_flow.py ou...
# ask-metaflow
l
Hi team, when I tried to use
python my_flow.py output-dot
I got this error:
Copy code
Internal error
Traceback (most recent call last):
  File "/home/sagemaker-user/.envs/personal_python/lib/python3.10/site-packages/metaflow/cli.py", line 634, in main
    start(auto_envvar_prefix="METAFLOW", obj=state)
  File "/home/sagemaker-user/.envs/personal_python/lib/python3.10/site-packages/metaflow/_vendor/click/core.py", line 829, in __call__
    return self.main(args, kwargs)
  File "/home/sagemaker-user/.envs/personal_python/lib/python3.10/site-packages/metaflow/_vendor/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/sagemaker-user/.envs/personal_python/lib/python3.10/site-packages/metaflow/cli_components/utils.py", line 69, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/sagemaker-user/.envs/personal_python/lib/python3.10/site-packages/metaflow/_vendor/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, ctx.params)
  File "/home/sagemaker-user/.envs/personal_python/lib/python3.10/site-packages/metaflow/_vendor/click/core.py", line 610, in invoke
    return callback(args, kwargs)
  File "/home/sagemaker-user/.envs/personal_python/lib/python3.10/site-packages/metaflow/_vendor/click/decorators.py", line 33, in new_func
    return f(get_current_context().obj, args, kwargs)
  File "/home/sagemaker-user/.envs/personal_python/lib/python3.10/site-packages/metaflow/cli.py", line 216, in output_dot
    echo("Visualizing the flow as a GraphViz graph", fg="magenta", bold=False)
NameError: name 'echo' is not defined
I am using metaflow 2.13.7. Has anyone encountered this error?
โœ… 1
s
checking - it could likely be a regression. @brainy-truck-72938 can you look into this?
๐Ÿ™ 1
๐Ÿ‘€ 1
b
this probably seems like a regression from work done on configs CC: @dry-beach-38304 fortunately, the fix seems simple, you can replace
echo
by
echo_always
further, if the command has
@click.pass_obj
one can also add the snippet:
Copy code
if obj.is_quiet:
        echo = echo_dev_null
    else:
        echo = echo_always
but it is mostly unnecessary for
output-dot
and
output-raw
commands would you like to contribute a fix @late-xylophone-98814?
d
thatsโ€™ probably it ๐Ÿ™‚. @late-xylophone-98814, let us know if you will open a PR else I can do it at some point soon.
l
thankyou 1
โœ… 1