Skip to content

copyright scan error #4129

Open
Open
@dd-jy

Description

@dd-jy

Description

Please leave a brief description of the bug or feature request:

Copyright scan error occured.

{
      "path": "source/.github/workflows/test.yaml",
      "type": "file",
      "detected_license_expression": null,
      "detected_license_expression_spdx": null,
      "license_detections": [],
      "license_clues": [],
      "percentage_of_license_text": 0,
      "copyrights": [],
      "holders": [],
      "authors": [],
      "scan_errors": [
        "ERROR: for scanner: copyrights:\nERROR: Unknown error:\nTraceback (most recent call last):\n  File \"/home/oscsystem/venv3/lib/python3.10/site-packages/scancode/interrupt.py\", line 91, in interruptible\n    return NO_ERROR, func(*(args or ()), **(kwargs or {}))\n  File \"/home/oscsystem/venv3/lib/python3.10/site-packages/scancode/api.py\", line 71, in get_copyrights\n    copyrights, holders, authors = Detection.split(detections, to_dict=True)\n  File \"/home/oscsystem/venv3/lib/python3.10/site-packages/cluecode/copyrights.py\", line 434, in split\n    for detection in detections:\n  File \"/home/oscsystem/venv3/lib/python3.10/site-packages/cluecode/copyrights.py\", line 110, in detect_copyrights\n    numbered_lines = numbered_text_lines(location, demarkup=demarkup)\n  File \"/home/oscsystem/venv3/lib/python3.10/site-packages/textcode/analysis.py\", line 116, in numbered_text_lines\n    if demarkup and markup.is_markup(location):\n  File \"/home/oscsystem/venv3/lib/python3.10/site-packages/textcode/markup.py\", line 67, in is_markup\n    return is_markup_text(start)\n  File \"/home/oscsystem/venv3/lib/python3.10/site-packages/textcode/markup.py\", line 72, in is_markup_text\n    if text.startswith('<'):\nTypeError: startswith first arg must be bytes or a tuple of bytes, not str\n"
      ]

How To Reproduce

Tell us how to reproduce the issue.

  1. Download the check source code : git clone https://github.com/go-check/check
  2. Command : scancode -l -c --json-pp out.json check

System configuration

For bug reports, it really helps us to know:

  • What OS are you running on? (Windows/MacOS/Linux) : Linux 22.04 / python3.10.12
  • What version of scancode-toolkit was used to generate the scan file? : 32.2.1
  • What installation method was used to install/run scancode? (pip/source download/other) : pip

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions