Bug report
A minimal bug can be found using the following file
from subprocess import Popen, PIPE
env = {}
env["a"] = None
process = Popen(['echo', '"hello"'], stdout=PIPE, stderr=PIPE, env = env)
stdout, stderr = process.communicate()
Your environment
M1 MacOS Monterey, python 3.10
x86_64 Ubuntu 20.04 LTS, python 3.11 (installed via pyenv)