Skip to content

Missing license_categories.yaml in install path #1

@threexc

Description

@threexc

Hi,

I tried testing shipcheck in my local build environment. I did:

  1. uv tool install shipcheck
  2. cd ~/workspace/yocto/openembedded-core/build
  3. shipcheck init
  4. shipcheck check --build-dir .

But I get:

│ /home/tgamblin/.local/share/uv/tools/shipcheck/lib64/python3.14/site-packages/shipcheck/checks/license_audit.py:48 in _load_categories                                     │
│                                                                                                                                                                            │
│    45 │                                                                                                                                                                    │
│    46 │   Returns a flat dict keyed by licence ID (e.g. ``"GPL-2.0-only": "strong-copyleft"``).                                                                            │
│    47 │   """                                                                                                                                                              │
│ ❱  48 │   raw = yaml.safe_load(_CATEGORIES_FILE.read_text()) or {}                                                                                                         │
│    49 │   mapping: dict[str, str] = {}                                                                                                                                     │
│    50 │   for category, ids in raw.items():                                                                                                                                │
│    51 │   │   if not isinstance(ids, list):                                                                                                                                │
│                                                                                                                                                                            │
│ /usr/lib64/python3.14/pathlib/__init__.py:787 in read_text                                                                                                                 │
│                                                                                                                                                                            │
│    784 │   │   # Call io.text_encoding() here to ensure any warning is raised at an                                                                                        │
│    785 │   │   # appropriate stack level.                                                                                                                                  │
│    786 │   │   encoding = io.text_encoding(encoding)                                                                                                                       │
│ ❱  787 │   │   with self.open(mode='r', encoding=encoding, errors=errors, newline=newline) as f:                                                                           │
│    788 │   │   │   return f.read()                                                                                                                                         │
│    789 │                                                                                                                                                                   │
│    790 │   def write_bytes(self, data):                                                                                                                                    │
│                                                                                                                                                                            │
│ /usr/lib64/python3.14/pathlib/__init__.py:771 in open                                                                                                                      │
│                                                                                                                                                                            │
│    768 │   │   """                                                                                                                                                         │
│    769 │   │   if "b" not in mode:                                                                                                                                         │
│    770 │   │   │   encoding = io.text_encoding(encoding)                                                                                                                   │
│ ❱  771 │   │   return io.open(self, mode, buffering, encoding, errors, newline)                                                                                            │
│    772 │                                                                                                                                                                   │
│    773 │   def read_bytes(self):                                                                                                                                           │
│    774 │   │   """                                                                                                                                                         │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [Errno 2] No such file or directory:
'/home/tgamblin/.local/share/uv/tools/shipcheck/lib64/python3.14/site-packages/shipcheck/checks/license_categories.yaml'

I also don't see anything resembling that file in the tool install path:

tgamblin@megalith ~/workspace/yocto/openembedded-core/build (tgamblin/patchtest)$ find ~/.local/share/uv/tools/shipcheck/* -name *license*
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/typer-0.25.0.dist-info/licenses
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/annotated_doc-0.0.4.dist-info/licenses
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/shipcheck/checks/license_audit.py
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/shipcheck/checks/__pycache__/license_audit.cpython-314.pyc
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/markupsafe-3.0.3.dist-info/licenses
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/click-8.3.3.dist-info/licenses
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/jinja2-3.1.6.dist-info/licenses
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/pyyaml-6.0.3.dist-info/licenses
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/shipcheck-0.0.4.dist-info/licenses
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/rich-15.0.0.dist-info/licenses
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/markdown_it_py-4.0.0.dist-info/licenses
/home/tgamblin/.local/share/uv/tools/shipcheck/lib/python3.14/site-packages/pygments-2.20.0.dist-info/licenses

Is this a code path that has changed recently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions