Skip to content

Commit bddf069

Browse files
committed
fix: Fix corrupted file
1 parent 968e2fb commit bddf069

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/c2pa/c2pa.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,10 @@ def __init__(self,
10141014

10151015
# Keep mime_type string alive
10161016
try:
1017+
print("## Getting mimetype encoding")
10171018
self._mime_type_str = mime_type.encode('utf-8')
10181019
except UnicodeError as e:
1020+
print("## Failed encoding on mimetype")
10191021
raise C2paError.Encoding(
10201022
self._error_messages['encoding_error'].format(
10211023
str(e)))
@@ -1102,8 +1104,10 @@ def __init__(self,
11021104

11031105
with Stream(stream) as stream_obj:
11041106
if manifest_data is None:
1107+
print("## Preparing to call _lib.c2pa_reader_from_stream")
11051108
self._reader = _lib.c2pa_reader_from_stream(
11061109
self._format_str, stream_obj._stream)
1110+
print("## Called: _lib.c2pa_reader_from_stream")
11071111
else:
11081112
if not isinstance(manifest_data, bytes):
11091113
raise TypeError(self._error_messages['manifest_error'])
51.3 KB
Loading

0 commit comments

Comments
 (0)