Skip to content

subprocess.CalledProcessError: Command '('coverage', 'json', '-o', '-')' returned non-zero exit status 2. #303

@omercnet

Description

@omercnet
2023-12-04T14:04:41.0481051Z ##[notice]Starting action
2023-12-04T14:04:41.2909319Z ##[notice]HTTP Request: GET https://api.github.com/repos/descope/python-sdk "HTTP/1.1 200 OK"
2023-12-04T14:04:41.2916256Z ##[notice]Generating comment for PR
2023-12-04T14:04:41.6464808Z ##[error]Critical error. This error possibly occurred because the permissions of the workflow are set incorrectly. You can see the correct setting of permissions here: https://github.com/py-cov-action/python-coverage-comment-action#basic-usage
Otherwise please look for open issues or open one in https://github.com/py-cov-action/python-coverage-comment-action/
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/coverage_comment/subprocess.py", line 18, in run
    return subprocess.run(
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('coverage', 'json', '-o', '-')' returned non-zero exit status 2.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/coverage_comment/main.py", line 40, in main
    exit_code = action(
                ^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/coverage_comment/main.py", line 92, in action
    return process_pr(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/coverage_comment/main.py", line 123, in process_pr
    _, coverage = coverage_module.get_coverage_info(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/coverage_comment/coverage.py", line 84, in get_coverage_info
    subprocess.run("coverage", "json", "-o", "-", path=coverage_path)
  File "/usr/local/lib/python3.11/site-packages/coverage_comment/subprocess.py", line 27, in run
    raise SubProcessError("\n".join([exc.stdout, exc.stderr])) from exc
coverage_comment.subprocess.SubProcessError: {"meta": {"version": "7.3.2", "timestamp": "2023-12-04T14:04:41.489052", "branch_coverage": false, "show_contexts": false}, "files": {"descope/__init__.py": {"executed_lines": [1, 10, 11, 18, 19], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "descope/_auth_base.py": {"executed_lines": [2, 5, 6, 8, 9], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0}, "missing_lines": [], "excluded_lines": []}, "descope/auth.py": {"executed_lines": [1, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 19, 20, 21, 23, 35, 47, 48, 49, 54, 62, 63, 65, 74, 76, 77, 78, 86, 87, 88, 90, 91, 92, 94, 95, 96, 97, 99, 100, 102, 103, 104, 116, 123, 131, 132, 134, 137, 146, 147, 149, 152, 160, 161, 163, 164, 165, 171, 172, 173, 174, 177, 179, 180, 183, 184, 186, 187, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 208, 210, 212, 213, 214, 220, 221, 225, 227, 228, 229, 235, 236, 240, 242, 243, 244, 250, 251, 255, 257, 258, 259, 260, 266, 267, 268, 269, 273, 274, 275, 276, 282, 283, 287, 288, 292, 295, 296, 297, 298, 302, 303, 304, 306, 307, 308, 309, 315, 316, 317, 318, 319, 325, 326, 327, 333, 334, 335, 340, 342, 343, 344, 350, 352, 353, 355, 356, 358, 364, 366, 372, 374, 375, 376, 377, 378, 379, 384, 385, 386, 387, 388, 393, 395, 396, 399, 400, 403, 404, 407, 410, 414, 415, 416, 419, 424, 428, 433, 435, 438, 440, 442, 449, 450, 451, 452, 453, 454, 455, 458, 459, 463, 465, 466, 473, 475, 481, 485, 486, 487, 489, 490, 491, 492, 493, 494, 495, 498, 501, 507, 508, 509, 510, 516, 517, 518, 522, 523, 524, 528, 529, 530, 532, 533, 541, 543, 544, 551, 552, 559, 560, 566, 567, 569, 572, 573, 579, 580, 583, 585, 588, 595, 597, 598, 600, 601, 603, 609, 610, 616, 617, 618, 620, 626, 628, 647, 648, 649, 650, 651, 652], "summary": {"covered_lines": 269, "num_statements": 288, "percent_covered": 93.40277777777777, "percent_covered_display": "93", "missing_lines": 19, "excluded_lines": 0}, "missing_lines": [16, 17, 50, 51, 389, 391, 502, 534, 545, 589, 621, 629, 630, 636, 637, 641, 642, 645, 653], "excluded_lines": []}, "descope/authmethod/__init__.py": {"executed_lines

https://github.com/descope/python-sdk/actions/runs/7086877486/job/19288591568

I do not think this is a permission error, as permissions are there and it's been working well for a while

looks like the input is truncated by this might be github logs issue and not really

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions