As shown by
with subprocess.Popen(
and
No such file or directory: 'mysqldump'
You are missing the mysqldump command on your Mac (Based off the file paths), which you will be able to install via brew install mysql-client or brew install mysql if you want the server installed as well.