I have a strange error in my Python Flask app running on VS Code in Windows 10. The app runs as intended for the first time, however whenever I run the app for a second time, I get this error: "CoInitialize has not been called".
I've tried using pythoncom but this doesn't seem to have an effect. From searching it seems like pythoncom is for win32 (I'm using Win64 and 64 bit python) and when I tried to install pywin32 and pypiwin32 it said it was already installed on my device.
My app is an ocr/tts application built in flask. Here are my imports and the pythoncom line:
import os
from flask import Flask, render_template, request, flash, redirect, url_for
from werkzeug.utils import secure_filename
import pytesseract as tess
import pyttsx3
import cv2
import pythoncom
pythoncom.CoInitialize()
I would appreciate any help from someone who might know what the problem is or what to try next.