Skip to content

AttributeError: 'list' object has no attribute 'translate' #19

Description

@YPCrumble

Hi - I'm trying to run the dump from my Django instance and getting the following error. Let me know if I could provide any further information to shed more light on the issue? Thanks again for building this!

Traceback (most recent call last):
  File "/.virtualenvs/bin/database-sanitizer", line 11, in <module>
    sys.exit(main())
  File "/lib/python3.7/site-packages/database_sanitizer/__main__.py", line 57, in main
    config=config,
  File "/lib/python3.7/site-packages/database_sanitizer/dump/__init__.py", line 46, in run
    for line in db_module.sanitize(url=parsed_url, config=config):
  File "/lib/python3.7/site-packages/database_sanitizer/dump/postgres.py", line 71, in sanitize
    yield sanitize_value_line(line)
  File "/lib/python3.7/site-packages/database_sanitizer/dump/postgres.py", line 115, in sanitize_line
    for (sanitizer, value) in zip(sanitizers, values))
  File "/lib/python3.7/site-packages/database_sanitizer/dump/postgres.py", line 115, in <genexpr>
    for (sanitizer, value) in zip(sanitizers, values))
  File "/lib/python3.7/site-packages/database_sanitizer/dump/postgres.py", line 100, in decode_sanitize_encode
    return encode_copy_value(sanitizer(decode_copy_value(value)))
  File "/lib/python3.7/site-packages/database_sanitizer/utils/postgres.py", line 119, in encode_copy_value
    return value.translate(ENCODE_TRANSLATE_TABLE)
AttributeError: 'list' object has no attribute 'translate'

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