python-database-sanitizer icon indicating copy to clipboard operation
python-database-sanitizer copied to clipboard

Tabs in a column raise a ValueError

Open YPCrumble opened this issue 5 years ago • 1 comments

Thanks for building this repo!

Currently this line splits the db lines using line.split('\t'): https://github.com/andersinno/python-database-sanitizer/blob/master/database_sanitizer/dump/postgres.py#L126. The issue I'm encountering is that I have columns with user input that sometimes includes tabs. When the sanitizer encounters one of those fields it raises the ValueError.

Currently I've just added return line to skip any lines with tabs - but would be happy to write a PR if anyone has ideas on a graceful way to handle this!

YPCrumble avatar Jun 16 '20 14:06 YPCrumble

Actually, this is probably more related to django-sanitized-dump interacting with this line. Somehow a particular line is getting exported from django-sanitized-dump with an extra tab character. I'm not sure why yet...but will come back if I find out!

YPCrumble avatar Jun 16 '20 16:06 YPCrumble