Error: Command failed: python3 -c "
import zipfile
import xml.etree.ElementTree as ET
docx_path = '/var/lib/sot/client-repos/trust2connect-website/user_uploads/2026_Identity_Fraud_Report_Executive_Summary_1_-1.docx'
out_path = '/var/lib/sot/client-repos/trust2connect-website/extracted_content.md'
with zipfile.ZipFile(docx_path, 'r') as docx_zip:
document_xml = docx_zip.read('word/document.xml')
tree = ET.fromstring(document_xml)
namespaces = {'w': 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'}
paragraphs = tree.findall('.//w:p', namespaces)
text_content = []
for p in paragraphs:
texts = p.findall('.//w:t', namespaces)
p_text = ''.join(t.text for t in texts if t.text)
if p_text:
text_content.append(p_text)
with open(out_path, 'w', encoding='utf-8') as f:
f.write('
'.join(text_content))
print('Extraction complete')
"
File "<string>", line 23
f.write('
^
SyntaxError: unterminated string literal (detected at line 23)