...ModuleNotFoundError fixed by altering PYTHONPAT...
# general
n
...ModuleNotFoundError fixed by altering PYTHONPATH of the subprocess like this. Not sure if it might be useful for someone else, but it is simple as this:
Copy code
pypath = ":".join(sys.path)
myenv = os.environ.copy()
myenv["PYTHONPATH"] = pypath
PROCESS = await asyncio.create_subprocess_exec(
    script_path,
    stdin=asyncio.subprocess.PIPE,
    stdout=asyncio.subprocess.PIPE,
    stderr=asyncio.subprocess.STDOUT,
    env=myenv,