|
INFO:__main__:Worker started.
|
|
INFO:__main__:Parameters: Namespace(history_uuid='d771a676-e537-11ee-91b0-92628558f805')
|
|
INFO:__main__:conversion_history
|
|
INFO:__main__:<app.tts_common.models.history.ConversionHistory object at 0x7f50de131890>
|
|
INFO:__main__:current_user from db Ngan Dao
|
|
ERROR:__main__:processing tts_history: d771a676-e537-11ee-91b0-92628558f805
|
|
ERROR:__main__:current user_id: 10
|
|
INFO:__main__:Try to download and decrypt if needed for d771a676-e537-11ee-91b0-92628558f805
|
|
INFO:__main__:File downloaded successfully to: tmp/contabo_uploaded/10/20240318_145728_309943/test-protected.pdf
|
|
ERROR:__main__:Convert and send result failed
|
|
ERROR:__main__:File has not been decrypted
|
|
Traceback (most recent call last):
|
|
File "/app/worker.py", line 151, in main
|
|
input_file_path = decrypt_document(conversion_history, current_user)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/app/worker.py", line 87, in decrypt_document
|
|
decrypted_file_path = decrypt_pdf(input_file_path, file_password)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/app/app/tts_common/helpers/common_helper.py", line 88, in decrypt_pdf
|
|
for page in reader.pages:
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_page.py", line 2270, in __iter__
|
|
for i in range(len(self)):
|
|
^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_page.py", line 2201, in __len__
|
|
return self.length_function()
|
|
^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_reader.py", line 436, in _get_num_pages
|
|
return self.trailer[TK.ROOT]["/Pages"]["/Count"] # type: ignore
|
|
~~~~~~~~~~~~^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/generic/_data_structures.py", line 319, in __getitem__
|
|
return dict.__getitem__(self, key).get_object()
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/generic/_base.py", line 284, in get_object
|
|
obj = self.pdf.get_object(self)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_reader.py", line 1232, in get_object
|
|
raise FileNotDecryptedError("File has not been decrypted")
|
|
pypdf.errors.FileNotDecryptedError: File has not been decrypted
|
|
ERROR:__main__:Traceback (most recent call last):
|
|
File "/app/worker.py", line 151, in main
|
|
input_file_path = decrypt_document(conversion_history, current_user)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/app/worker.py", line 87, in decrypt_document
|
|
decrypted_file_path = decrypt_pdf(input_file_path, file_password)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/app/app/tts_common/helpers/common_helper.py", line 88, in decrypt_pdf
|
|
for page in reader.pages:
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_page.py", line 2270, in __iter__
|
|
for i in range(len(self)):
|
|
^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_page.py", line 2201, in __len__
|
|
return self.length_function()
|
|
^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_reader.py", line 436, in _get_num_pages
|
|
return self.trailer[TK.ROOT]["/Pages"]["/Count"] # type: ignore
|
|
~~~~~~~~~~~~^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/generic/_data_structures.py", line 319, in __getitem__
|
|
return dict.__getitem__(self, key).get_object()
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/generic/_base.py", line 284, in get_object
|
|
obj = self.pdf.get_object(self)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_reader.py", line 1232, in get_object
|
|
raise FileNotDecryptedError("File has not been decrypted")
|
|
pypdf.errors.FileNotDecryptedError: File has not been decrypted
|
|
Traceback (most recent call last):
|
|
File "/app/worker.py", line 151, in main
|
|
input_file_path = decrypt_document(conversion_history, current_user)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/app/worker.py", line 87, in decrypt_document
|
|
decrypted_file_path = decrypt_pdf(input_file_path, file_password)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/app/app/tts_common/helpers/common_helper.py", line 88, in decrypt_pdf
|
|
for page in reader.pages:
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_page.py", line 2270, in __iter__
|
|
for i in range(len(self)):
|
|
^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_page.py", line 2201, in __len__
|
|
return self.length_function()
|
|
^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_reader.py", line 436, in _get_num_pages
|
|
return self.trailer[TK.ROOT]["/Pages"]["/Count"] # type: ignore
|
|
~~~~~~~~~~~~^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/generic/_data_structures.py", line 319, in __getitem__
|
|
return dict.__getitem__(self, key).get_object()
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/generic/_base.py", line 284, in get_object
|
|
obj = self.pdf.get_object(self)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_reader.py", line 1232, in get_object
|
|
raise FileNotDecryptedError("File has not been decrypted")
|
|
pypdf.errors.FileNotDecryptedError: File has not been decrypted
|
|
ERROR:__main__:d771a676-e537-11ee-91b0-92628558f805
|
|
Traceback (most recent call last):
|
|
File "/app/worker.py", line 151, in main
|
|
input_file_path = decrypt_document(conversion_history, current_user)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/app/worker.py", line 87, in decrypt_document
|
|
decrypted_file_path = decrypt_pdf(input_file_path, file_password)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/app/app/tts_common/helpers/common_helper.py", line 88, in decrypt_pdf
|
|
for page in reader.pages:
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_page.py", line 2270, in __iter__
|
|
for i in range(len(self)):
|
|
^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_page.py", line 2201, in __len__
|
|
return self.length_function()
|
|
^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_reader.py", line 436, in _get_num_pages
|
|
return self.trailer[TK.ROOT]["/Pages"]["/Count"] # type: ignore
|
|
~~~~~~~~~~~~^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/generic/_data_structures.py", line 319, in __getitem__
|
|
return dict.__getitem__(self, key).get_object()
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/generic/_base.py", line 284, in get_object
|
|
obj = self.pdf.get_object(self)
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
File "/usr/local/lib/python3.11/site-packages/pypdf/_reader.py", line 1232, in get_object
|
|
raise FileNotDecryptedError("File has not been decrypted")
|
|
pypdf.errors.FileNotDecryptedError: File has not been decrypted
|
|
INFO:app.tts_common.helpers.email_helper:Send vocalized file failed notice email
|
|
INFO:app.tts_common.helpers.email_helper:sent to message to kafka topic: tts-emails-prod
|
|
INFO:Firebase client:Add notification to firebase START
|
|
INFO:Firebase client:Add notification to firebase END
|
|
INFO:__main__:Recalculate user locked credit
|
|
INFO:__main__:Convert and send result END
|
|
Produced event to topic tts-emails-prod: value = {"function": "send_vocalized_file_failed_notice", "email_to": "daongan011998@gmail.com", "recipient_name": "Ngan Dao", "file_name": "test-protected.pdf"}
|