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

Keep markers at the track if child_at_time() found something that does not hold markers #1239

Merged
merged 4 commits into from Mar 11, 2022

Conversation

jchen9
Copy link
Contributor

@jchen9 jchen9 commented Mar 11, 2022

The issue happens when track.child_at_time() found something the does not have markers property, for example, Transition.

It triggered AttributeError: 'opentimelineio._otio.Transition' object has no attribute 'markers' in the line:

                # attach marker to target item
                target_item.markers.append(marker)

The change now checks both None and whether the target_item has the markers attribute.
An example AAF composition and test case demonstrating the issue is also added.

@meshula
Copy link
Collaborator

meshula commented Mar 11, 2022

don't think there's a reason to break up a print statement to satisfy a line length rule in this case, such a split won't make the code more readable. #noqa will resolve it

@codecov-commenter
Copy link

Codecov Report

Merging #1239 (d4d82e5) into main (46d19ef) will decrease coverage by 0.00%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1239      +/-   ##
==========================================
- Coverage   86.15%   86.15%   -0.01%     
==========================================
  Files         196      196              
  Lines       19624    19632       +8     
  Branches     2302     2302              
==========================================
+ Hits        16907    16913       +6     
- Misses       2159     2161       +2     
  Partials      558      558              
Flag Coverage Δ
py-unittests 86.15% <77.77%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...elineio_contrib/adapters/tests/test_aaf_adapter.py 98.08% <75.00%> (-0.28%) ⬇️
...neio_contrib/adapters/advanced_authoring_format.py 81.42% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46d19ef...d4d82e5. Read the comment docs.

@meshula meshula merged commit 91561c0 into AcademySoftwareFoundation:main Mar 11, 2022
jminor pushed a commit that referenced this pull request May 2, 2022
…oes not hold markers (#1239)

* add a test case for markers over transition

* Keep markers on track if we found something doesn’t hold markers
@ssteinbach ssteinbach added this to the Public Beta 15 milestone Sep 19, 2022
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

Successfully merging this pull request may close these issues.

None yet

4 participants