From 8d3c95a764747d1241adef37e1a630a6cf979c5d Mon Sep 17 00:00:00 2001 From: Maxim Zhiltsov Date: Wed, 9 Sep 2020 19:26:15 +0300 Subject: [PATCH] Fix PDF reading (#2141) Co-authored-by: Nikita Manovich --- CHANGELOG.md | 1 + cvat/apps/engine/task.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index baa81bdd938b..3f0e89128e02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed multiple errors which arises when polygon is of length 5 or less () +- Fixed task creation from PDF () - Fixed CVAT format import for frame stepped tasks () ### Security diff --git a/cvat/apps/engine/task.py b/cvat/apps/engine/task.py index 1056e2f3bc6d..e89877295088 100644 --- a/cvat/apps/engine/task.py +++ b/cvat/apps/engine/task.py @@ -311,7 +311,7 @@ def update_progress(progress): counter_ = itertools.count() if isinstance(extractor, MEDIA_TYPES['archive']['extractor']): media_files = [os.path.relpath(path, upload_dir) for path in extractor._source_path] - elif isinstance(extractor, MEDIA_TYPES['zip']['extractor']): + elif isinstance(extractor, (MEDIA_TYPES['zip']['extractor'], MEDIA_TYPES['pdf']['extractor'])): media_files = extractor._source_path numbers_sequence = range(db_data.start_frame, min(data['stop_frame'] if data['stop_frame'] else len(media_files), len(media_files)), db_data.get_frame_step())