Project

General

Profile

Bug #814 » job-container-72a7da40-1d8a-11ef-b788-f6ab975cfae5.log

logs - Trịnh Thế Định, 05/30/2024 08:10 PM

 
INFO:__main__:Worker started.
INFO:__main__:Parameters: Namespace(history_uuid='72a7da40-1d8a-11ef-b788-f6ab975cfae5', limit_vcpu=None, limit_ram=None)
INFO:__main__:conversion_history
INFO:__main__:<app.tts_common.models.history.ConversionHistory object at 0x7ff04c46dd10>
INFO:__main__:current_user from db Christian
INFO:__main__:processing history: 72a7da40-1d8a-11ef-b788-f6ab975cfae5
INFO:__main__:current history type: tts-document
INFO:__main__:current user_id: 41047
INFO:__main__:processing document: 72a7da40-1d8a-11ef-b788-f6ab975cfae5
INFO:__main__:Try to download and decrypt if needed for flare_uploaded/41047/20240529_070951_619584/DieSchatzinsel.azw
INFO:app.tts_common.helpers.tts_history_helper:File downloaded successfully to: tmp/flare_uploaded/41047/20240529_070951_619584/DieSchatzinsel.azw
INFO:app.tts_common.services.key_service:Init key service with priorities: [90, 91, 92, 93, 96, 97]
INFO:Job: history 72a7da40-1d8a-11ef-b788-f6ab975cfae5:Convert TTS and send result START...
INFO:Job: history 72a7da40-1d8a-11ef-b788-f6ab975cfae5:conversion_history_uuid 72a7da40-1d8a-11ef-b788-f6ab975cfae5
INFO:Job: history 72a7da40-1d8a-11ef-b788-f6ab975cfae5:input_file_path tmp/flare_uploaded/41047/20240529_070951_619584/DieSchatzinsel.azw
INFO:Job: history 72a7da40-1d8a-11ef-b788-f6ab975cfae5:model_price_rate 1
INFO:Job: history 72a7da40-1d8a-11ef-b788-f6ab975cfae5:docs_extension azw
INFO:Job: history 72a7da40-1d8a-11ef-b788-f6ab975cfae5:Processing document with type : openai_voice
INFO:Job: history 72a7da40-1d8a-11ef-b788-f6ab975cfae5:START tts_document_extract_text_and_convert_to_speech ...
INFO:app.tts_common.services.key_service:Init key service with priorities: [90, 91, 92, 93, 96, 97]
INFO:app.tts_common.services.key_service:Init key service with priorities: [90, 91, 92, 93, 96, 97]
INFO:Job: history 72a7da40-1d8a-11ef-b788-f6ab975cfae5:START tts_document_extract_file_content ...
ERROR:__main__:Convert and send result failed
ERROR:__main__:unpack_from requires a buffer of at least 292030 bytes for unpacking 291952 bytes at offset 78 (actual buffer size is 233350)
Traceback (most recent call last):
File "/app/worker.py", line 155, in main
convert_result = await convert_and_send_result_document(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 88, in convert_and_send_result_document
pieces, list_files, base_used_credits = await tts_document_extract_text_and_convert_to_speech(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 354, in tts_document_extract_text_and_convert_to_speech
characters_count, pieces = await tts_document_extract_file_content(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 453, in tts_document_extract_file_content
content = tts_service.simple_extract_text_from_document(input_file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/services/speech.py", line 55, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/services/speech_tika.py", line 19, in simple_extract_text_from_document
tempdir, file_path = extract(file_path)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mobi/extract.py", line 29, in extract
unpackBook(infile, tempdir, epubver="A")
File "/usr/local/lib/python3.11/site-packages/mobi/kindleunpack.py", line 989, in unpackBook
sect = Sectionizer(infile)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mobi/mobi_sectioner.py", line 62, in __init__
sectionsdata = struct.unpack_from(
^^^^^^^^^^^^^^^^^^^
struct.error: unpack_from requires a buffer of at least 292030 bytes for unpacking 291952 bytes at offset 78 (actual buffer size is 233350)
ERROR:__main__:Traceback (most recent call last):
File "/app/worker.py", line 155, in main
convert_result = await convert_and_send_result_document(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 88, in convert_and_send_result_document
pieces, list_files, base_used_credits = await tts_document_extract_text_and_convert_to_speech(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 354, in tts_document_extract_text_and_convert_to_speech
characters_count, pieces = await tts_document_extract_file_content(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 453, in tts_document_extract_file_content
content = tts_service.simple_extract_text_from_document(input_file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/services/speech.py", line 55, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/services/speech_tika.py", line 19, in simple_extract_text_from_document
tempdir, file_path = extract(file_path)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mobi/extract.py", line 29, in extract
unpackBook(infile, tempdir, epubver="A")
File "/usr/local/lib/python3.11/site-packages/mobi/kindleunpack.py", line 989, in unpackBook
sect = Sectionizer(infile)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mobi/mobi_sectioner.py", line 62, in __init__
sectionsdata = struct.unpack_from(
^^^^^^^^^^^^^^^^^^^
struct.error: unpack_from requires a buffer of at least 292030 bytes for unpacking 291952 bytes at offset 78 (actual buffer size is 233350)
Traceback (most recent call last):
File "/app/worker.py", line 155, in main
convert_result = await convert_and_send_result_document(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 88, in convert_and_send_result_document
pieces, list_files, base_used_credits = await tts_document_extract_text_and_convert_to_speech(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 354, in tts_document_extract_text_and_convert_to_speech
characters_count, pieces = await tts_document_extract_file_content(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 453, in tts_document_extract_file_content
content = tts_service.simple_extract_text_from_document(input_file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/services/speech.py", line 55, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/services/speech_tika.py", line 19, in simple_extract_text_from_document
tempdir, file_path = extract(file_path)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mobi/extract.py", line 29, in extract
unpackBook(infile, tempdir, epubver="A")
File "/usr/local/lib/python3.11/site-packages/mobi/kindleunpack.py", line 989, in unpackBook
sect = Sectionizer(infile)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mobi/mobi_sectioner.py", line 62, in __init__
sectionsdata = struct.unpack_from(
^^^^^^^^^^^^^^^^^^^
struct.error: unpack_from requires a buffer of at least 292030 bytes for unpacking 291952 bytes at offset 78 (actual buffer size is 233350)
ERROR:__main__:72a7da40-1d8a-11ef-b788-f6ab975cfae5
Traceback (most recent call last):
File "/app/worker.py", line 155, in main
convert_result = await convert_and_send_result_document(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 88, in convert_and_send_result_document
pieces, list_files, base_used_credits = await tts_document_extract_text_and_convert_to_speech(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 354, in tts_document_extract_text_and_convert_to_speech
characters_count, pieces = await tts_document_extract_file_content(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/jobs/convert_and_send_result.py", line 453, in tts_document_extract_file_content
content = tts_service.simple_extract_text_from_document(input_file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/services/speech.py", line 55, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/app/tts_common/services/speech_tika.py", line 19, in simple_extract_text_from_document
tempdir, file_path = extract(file_path)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mobi/extract.py", line 29, in extract
unpackBook(infile, tempdir, epubver="A")
File "/usr/local/lib/python3.11/site-packages/mobi/kindleunpack.py", line 989, in unpackBook
sect = Sectionizer(infile)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mobi/mobi_sectioner.py", line 62, in __init__
sectionsdata = struct.unpack_from(
^^^^^^^^^^^^^^^^^^^
struct.error: unpack_from requires a buffer of at least 292030 bytes for unpacking 291952 bytes at offset 78 (actual buffer size is 233350)
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": "theis1705@gmx.net", "recipient_name": "Christian", "file_name": "DieSchatzinsel.azw"}
(1-1/2)