Python syntax error on humble.py · Issue #25 · rfc-st/humble (original) (raw)
Describe the bug
File "humble.py", line 1144
print(f"\n {get_detail('[args_skipped_unknown]', replace=True)}
^
SyntaxError: f-string expression part cannot include a backslash
To Reproduce
Execute humble.py from command line or docker command
Expected behavior
humble.py should be executed without syntax errors
Desktop (please complete the following information):
- OS: Windows
- Version: 22H2
Additional context
I've fixed the issue with the solution proposed by ChatGPT
def print_unsupported_headers(unsupported_headers):
headers_str = ', '.join(f'"{header}"' for header in unsupported_headers)
print(f"\n {get_detail('[args_skipped_unknown]', replace=True)} ({headers_str})")
sys.exit()
Maybe there is a better way to do it but it worked. Thanks