AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO

FCPX reader fails reading clip with solid color generator

Open
#1,141 8 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
C++
Stars
2k
Forks
351
Avg merge
1d 12h
Merged PRs (30d)
1

Description

I got the following error when reading part of the .fcpxml file.

**'NoneType' object has no attribute 'find'**

```
Traceback (most recent call last):
File "/data/papepipe/pg_production_lib/src/lib/production/edit/otio/otio_checking.py", line 43, in
info(xml)
File "/data/papepipe/pg_production_lib/src/lib/production/edit/otio/otio_checking.py", line 20, in info
tl = otio.adapters.read_from_file(xml_path)
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio/adapters/__init__.py", line 144, in read_from_file
**adapter_argument_map
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio/adapters/adapter.py", line 134, in read_from_file
**adapter_argument_map
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio/plugins/python_plugin.py", line 174, in _execute_function
return (getattr(self.module(), func_name)(**kwargs))
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio_contrib/adapters/fcpx_xml.py", line 1168, in read_from_string
return FcpxXml(input_str).to_otio()
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio_contrib/adapters/fcpx_xml.py", line 795, in to_otio
return self._from_library()
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio_contrib/adapters/fcpx_xml.py", line 806, in _from_library
return self._from_event(self.fcpx_xml.find("./library/event"))
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio_contrib/adapters/fcpx_xml.py", line 813, in _from_event
container.append(self._from_project(project))
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio_contrib/adapters/fcpx_xml.py", line 819, in _from_project
project_element.find("./sequence", {})
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio_contrib/adapters/fcpx_xml.py", line 853, in _squence_to_stack
sequence_element.get("format")
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio_contrib/adapters/fcpx_xml.py", line 900, in _build_composable
self._format_id_for_clip(element, default_format)
File "/l/packages/pg/third_party/plugin/python_lib/0.0.11/platform-linux/lib/site-packages/opentimelineio_contrib/adapters/fcpx_xml.py", line 1020, in _format_id_for_clip
clip.get("ref")
AttributeError: 'NoneType' object has no attribute 'find'
```
## To Reproduce

1. Operating System: CentOS 7
2. Python version: Pythoin 2.7.18
3. OpenTimelineIO release version or commit hash: OpenTimelineIO==0.13.0

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the reported FCPXML and inspect opentimelineio_contrib/adapters/fcpx_xml.py, especially _from_project, _squence_to_stack, _build_composable, and _format_id_for_clip. Confirm how a solid color generator is represented, then verify that reading the file completes without the NoneType exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.