Skip to content

FileNotFoundError: [Errno 2] No such file or directory: 'mysqldump': 'mysqldump' #27

Description

@azin634

Using OSX

Empty dict is being passed into the env args for subprocess.Popen. This causes the command to not be able to find mysqldump. env is being initialized as empty dict here

(venv) edwin$ database-sanitizer mysql://root@localhost/test
Traceback (most recent call last):
  File "/Users/edwin/code/test/venv/bin/database-sanitizer", line 11, in <module>
    sys.exit(main())
  File "/Users/edwin/code/test/venv/lib/python3.6/site-packages/database_sanitizer/__main__.py", line 60, in main
    config=config,
  File "/Users/edwin/code/test/venv/lib/python3.6/site-packages/database_sanitizer/dump/__init__.py", line 46, in run
    for line in db_module.sanitize(url=parsed_url, config=config):
  File "/Users/edwin/code/test/venv/lib/python3.6/site-packages/database_sanitizer/dump/mysql.py", line 68, in sanitize
    stdout=subprocess.PIPE,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'mysqldump': 'mysqldump'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions