rez icon indicating copy to clipboard operation
rez copied to clipboard

TypeError: not enough arguments for format string in rez-cp _copy_variant_payload

Open jopollack opened this issue 3 years ago • 1 comments

I get the following error when running rez-cp as part of a release procedure. It appears as though it should raise a PackageCopyError, but instead breaks due to a bad format string.

Traceback (most recent call last):
  File "/rel/third_party/rez/2.106.0/bin/rez/rez-cp", line 8, in <module>
    sys.exit(run_rez_cp())
  File "/rel/third_party/rez/2.106.0/lib/python3.7/site-packages/rez/cli/_entry_points.py", line 127, in run_rez_cp
    return run("cp")
  File "/rel/third_party/rez/2.106.0/lib/python3.7/site-packages/rez/cli/_main.py", line 191, in run
    returncode = run_cmd()
  File "/rel/third_party/rez/2.106.0/lib/python3.7/site-packages/rez/cli/_main.py", line 183, in run_cmd
    return func(opts, opts.parser, extra_arg_groups)
  File "/rel/third_party/rez/2.106.0/lib/python3.7/site-packages/rez/cli/cp.py", line 168, in command
    dry_run=opts.dry_run
  File "/rel/third_party/rez/2.106.0/lib/python3.7/site-packages/rez/package_copy.py", line 206, in copy_package
    verbose=verbose
  File "/rel/third_party/rez/2.106.0/lib/python3.7/site-packages/rez/package_copy.py", line 248, in _copy_variant_payload
    "be present on disk (%s)." % src_variant.uri, variant_root
TypeError: not enough arguments for format string

Environment

  • OS linux
  • Rez version 2.106.0
  • Rez python version 3.7.7

To Reproduce

  1. change a package.py's variants so that they no longer match the file path.
  2. rez-cp the resulting package to trigger the PackageCopyError that's supposed to occur. You will instead get the above TypeError.

jopollack avatar May 24 '22 22:05 jopollack

I'm seeing something similar on Windows, though it's related to the shortened variant symlinks not working on Windows.

wbpa-garrett avatar Mar 27 '24 17:03 wbpa-garrett