Skip to content

fix: Handle osslili informational output in download_and_scan_package (v1.6.1)#30

Merged
oscarvalenzuelab merged 1 commit intomainfrom
fix/osslili-informational-output-parsing
Nov 14, 2025
Merged

fix: Handle osslili informational output in download_and_scan_package (v1.6.1)#30
oscarvalenzuelab merged 1 commit intomainfrom
fix/osslili-informational-output-parsing

Conversation

@oscarvalenzuelab
Copy link
Contributor

Problem

The download_and_scan_package tool was failing with JSON parsing errors when scanning packages. User reported: "I'm seeing that the tool is still failing the download" with pkg:pypi/docxtpl@0.20.2.

Root Cause:

  • osslili now outputs informational messages before JSON: ℹ Processing local path: package.tar.gz
  • Code tried to parse this directly as JSON → json.loads() failed
  • Error: "Expecting value: line 1 column 1 (char 0)"

Solution

Added preprocessing to strip informational messages before JSON parsing:

  • Find first { character in output
  • Parse JSON from that position
  • Preserves backward compatibility

Changes

  • mcp_semclone/server.py: Strip informational messages before parsing osslili output (lines 2026-2031)
  • Version: 1.6.0 → 1.6.1
  • CHANGELOG.md: Added v1.6.1 entry with fix details and pipx installation note
  • All files: Updated version references

Testing

  • All 7 tests passing
  • Manually tested with pkg:pypi/docxtpl@0.20.2
  • osslili, upmex, purl2src all work correctly

Installation Note

When using pipx, ensure purl2src is globally available:

pipx inject mcp-semclone purl2src --include-apps --force

Impact

  • Fixes download_and_scan_package tool
  • Works with latest osslili versions
  • Resolves field-reported failures

… (v1.6.1)

- Strip informational messages (e.g., 'ℹ Processing local path...') before JSON parsing
- Find first '{' character and parse from there
- Fixes JSON parsing errors when osslili outputs messages before JSON
- All 7 tests passing
- Document pipx purl2src installation requirement
@oscarvalenzuelab oscarvalenzuelab merged commit 314a9cb into main Nov 14, 2025
2 checks passed
@oscarvalenzuelab oscarvalenzuelab deleted the fix/osslili-informational-output-parsing branch November 14, 2025 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant