akamai / uls

Unified Log Streamer (ULS)
Apache License 2.0
30 stars 10 forks source link

SyntaxError in UlsArgsParser: Unmatched Parenthesis in f-string Causing Application Failure with python 3.9 base image #72

Closed sethumadhav07 closed 1 month ago

sethumadhav07 commented 1 month ago

Is your feature request related to a problem? Please describe. When running the application, a SyntaxError occurs due to an unmatched parenthesis in an f-string inside the UlsArgsParser.py module. This causes the application to fail at startup.

Error traceback:

Traceback (most recent call last):
  File "/opt/akamai-uls/uls/bin/uls.py", line 27, in <module>
    import modules.UlsArgsParser as ArgsParser
  File "/opt/akamai-uls/uls/bin/modules/UlsArgsParser.py", line 55
    help=f"Adjust the logging date/time format to your needs, (Default: {uls_config.log_datefmt.replace("%", "%%")})")
                                                                                                         ^
SyntaxError: f-string: unmatched '('

Describe the solution you'd like The corrected code should look like this:

help=f"Adjust the logging date/time format to your needs, (Default: {uls_config.log_datefmt.replace('%', '%%')})")

Additional context This issue occurs when the application is executed, specifically in the UlsArgsParser.py module. Fixing the f-string will allow the application to run correctly without encountering a syntax error.

MikeSchiessl commented 1 month ago

Hi @sethumadhav07, the bug you describe here should have been fixed with our latest release ULS v1.8.2 - can you please check the version you have discovered the bug and upgraded? Please let me know if you still encounter an issue with this bug in the latest version.

We have also introduced a better test coverage throughout different python versions ;)

Best Mike

sethumadhav07 commented 1 month ago

Hi @MikeSchiessl I see the latest release addressed it. closing this task now. Thanks