newrelic-experimental / gha-new-relic-exporter

16 stars 12 forks source link

SyntaxError: unexpected character after line continuation character #5

Closed krzysztof-kabat-mns closed 1 year ago

krzysztof-kabat-mns commented 1 year ago

While testing your action we found following problem:

Traceback (most recent call last):
  File "/app/exporter.py", line 41, in <module>
    get_workflow_run_by_run_id = do_fastcore_decode(api.actions.get_workflow_run(GHA_RUN_ID))
  File "/app/custom_parser/__init__.py", line [9](https://github.com/DigitalInnovation/onyx/actions/runs/4946718567/jobs/8845168217#step:4:10), in do_fastcore_decode
    valid_dict = ast.literal_eval(to_str_replace)
  File "/usr/local/lib/python3.[10](https://github.com/DigitalInnovation/onyx/actions/runs/4946718567/jobs/8845168217#step:4:11)/ast.py", line 64, in literal_eval
    node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
  File "/usr/local/lib/python3.10/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1

We think it happens because in data there is this string:

'message': \"Merge branch 'main' into ACNT-924/task/onblur-error\",

dpacheconr commented 1 year ago

thanks for reporting this I have been unable to replicate this if you browse this https://github.com/DigitalInnovation/onyx/actions/runs/4946718567/jobs/8845168217#step:4:11 does this give you the message you are referring to -> 'message': "Merge branch 'main' into ACNT-924/task/onblur-error" where is that message being generated from? has this happen again?

dpacheconr commented 1 year ago

no action for over 2 months, please re-open if this is still an issues