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

otioconvert to OTIOZ fails with relative media target_urls #1817

Open
jminor opened this issue Dec 6, 2024 · 0 comments
Open

otioconvert to OTIOZ fails with relative media target_urls #1817

jminor opened this issue Dec 6, 2024 · 0 comments
Labels
bug A problem, flaw, or broken functionality.

Comments

@jminor
Copy link
Collaborator

jminor commented Dec 6, 2024

Description

otioconvert fails to convert OTIO to OTIOZ if there are media target_urls which start with "./"

Related bug: #1783

Reproduction Steps

  1. Download the attached OTIO and media file.
  2. Run this command:
% uvx --from opentimelineio otioconvert -i time_warp_test.otio -o time_warp_test.otioz

Log output if appropriate

Traceback (most recent call last):
  File "/Users/jminor/.cache/uv/archive-v0/egUCtOWX8VKGzLpjlRQw-/bin/otioconvert", line 10, in <module>
    sys.exit(main())
  File "/Users/jminor/.cache/uv/archive-v0/egUCtOWX8VKGzLpjlRQw-/lib/python3.8/site-packages/opentimelineio/console/otioconvert.py", line 273, in main
    otio.adapters.write_to_file(
  File "/Users/jminor/.cache/uv/archive-v0/egUCtOWX8VKGzLpjlRQw-/lib/python3.8/site-packages/opentimelineio/adapters/__init__.py", line 203, in write_to_file
    return adapter.write_to_file(
  File "/Users/jminor/.cache/uv/archive-v0/egUCtOWX8VKGzLpjlRQw-/lib/python3.8/site-packages/opentimelineio/adapters/adapter.py", line 189, in write_to_file
    result = self._execute_function(
  File "/Users/jminor/.cache/uv/archive-v0/egUCtOWX8VKGzLpjlRQw-/lib/python3.8/site-packages/opentimelineio/plugins/python_plugin.py", line 144, in _execute_function
    return (getattr(self.module(), func_name)(**kwargs))
  File "/Users/jminor/.cache/uv/archive-v0/egUCtOWX8VKGzLpjlRQw-/lib/python3.8/site-packages/opentimelineio/adapters/otioz.py", line 93, in write_to_file
    result_otio, path_to_mr_map = utils._prepped_otio_for_bundle_and_manifest(
  File "/Users/jminor/.cache/uv/archive-v0/egUCtOWX8VKGzLpjlRQw-/lib/python3.8/site-packages/opentimelineio/adapters/file_bundle_utils.py", line 132, in _prepped_otio_for_bundle_and_manifest
    target_file = os.path.abspath(url_utils.filepath_from_url(target_url))
  File "/Users/jminor/.cache/uv/archive-v0/egUCtOWX8VKGzLpjlRQw-/lib/python3.8/site-packages/opentimelineio/url_utils.py", line 75, in filepath_from_url
    elif PureWindowsPath(filepath.parts[1]).drive:
IndexError: tuple index out of range

Sample data and other attachements

otioconvert_relative_paths_to_otioz_bug_repro.zip

@reinecke reinecke added the bug A problem, flaw, or broken functionality. label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A problem, flaw, or broken functionality.
Projects
None yet
Development

No branches or pull requests

2 participants