Skip to content

Unable to find sanitizer called 'x.y' #33

@rohitjha941

Description

@rohitjha941

Getting following error while running sanitization

Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/database-sanitizer", line 11, in <module>
    sys.exit(main())
  File "/home/ubuntu/.local/lib/python3.6/site-packages/database_sanitizer/__main__.py", line 52, in main
    config = Configuration.from_file(args.config)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/database_sanitizer/config.py", line 53, in from_file
    instance.load(config_data)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/database_sanitizer/config.py", line 73, in load
    self.load_sanitizers(config_data)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/database_sanitizer/config.py", line 206, in load_sanitizers
    sanitizer_callback = self.find_sanitizer(sanitizer_name)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/database_sanitizer/config.py", line 285, in find_sanitizer
    name,
database_sanitizer.config.ConfigurationError: Unable to find sanitizer called 't.email'

Folder Structure:

/home/ubuntu/postgresql-data-backup/scripts

  • sanitize.yml
  • t.py

sanitize.yml

config:
  addons: []
strategy:
  users:
    email: t.email

t.py

def sanitize_email(value):
    return "test"

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