subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
return {'ok': False, 'text': '', 'error': 'high ocr unavailable'} out = Path(tempfile.mktemp(prefix='two-pass-high-', suffix='.json')) try: proc = subprocess.run( [str(HIGH_OCR_PY), str(HIGH_OCR), str(image_path), '--output', str(out)], capture_output=True, text=True, timeout=90 )- Confidence
- 78% confidence
- Finding
- proc = subprocess.run( [str(HIGH_OCR_PY), str(HIGH_OCR), str(image_path), '--output', str(out)], capture_output=True, text=True, timeout=90 )
