-
Notifications
You must be signed in to change notification settings - Fork 7
Open
@gilesdowner
Description
Checklist
- I have read the README and know the correct effect of the functional design.
- There are no similar reports on existing issues (including closed ones).
- I found the bug on the latest code of the
masterbranch.
Describe the bug
When using custom config through the Docker image
docker run -v "$(pwd):/home/nonroot/workdir" brootware/pyredactkit input-file.log -c custom.jsonI get this error
\______ \___.__. \______ \ ____ __| _/____ _____/ |_ | |/ _|__|/ |_ | ___< | | | _// __ \ / __ |\__ \ _/ ___\ __\ | < | \ __\ | | \___ | | | \ ___// /_/ | / __ \\ \___| | | | \| || | |____| / ____| |____|_ /\___ >____ |(____ /\___ >__| |____|__ \__||__| \/ \/ \/ \/ \/ \/ \/ +-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+-+ |P|o|w|e|r|e|d| |b|y| |B|r|o|o|t|w|a|r|e| +-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+-+ https://github.com/brootware https://brootware.github.io https://twitter.com/brootware [+] Processing starts now. This may take some time depending on the file size. Monitor the redacted file size to monitor progress [+] custom.json file supplied, will be redacting all supplied custom regex patterns Traceback (most recent call last): File "/usr/local/bin/prk", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.9/site-packages/pyredactkit/runner.py", line 157, in main execute_redact_logic() File "/usr/local/lib/python3.9/site-packages/pyredactkit/runner.py", line 146, in execute_redact_logic custom_redact.process_custom_file(file, args.customfile) File "/usr/local/lib/python3.9/site-packages/pyredactkit/custom_redactor.py", line 120, in process_custom_file data = self.redact_custom(line, customfile) File "/usr/local/lib/python3.9/site-packages/pyredactkit/custom_redactor.py", line 65, in redact_custom pattern_string = pattern_string.group(0) AttributeError: 'NoneType' object has no attribute 'group'
To Reproduce
Steps to reproduce the behavior:
- Go to WSL Ubuntu
- make sure docker is installed
- grab the custom.json from this repo
- run docker run -v "$(pwd):/home/nonroot/workdir" brootware/pyredactkit input-file.log -c custom.json
- See error
Expected behavior
it shouldn't break and the log should be redacted
Screenshots
Software
- Python version: by running:
python --version - pip version: by running:
pip --version - Power shell version: by running:
$PSVersionTable.PSVersion
Desktop
- MacOS: [e.g. macOS 10.15.6] by running:
sw_vers -productVersion - Windows: by running:
Get-ComputerInfo | select WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer - Terminal or Power-shell:
Additional context
Metadata
Metadata
Assignees
Labels
No labels