langchain-ai/deepagents · warning · MarketplaceError
Please enter a marketplace source
Error message
Please enter a marketplace source
What it means
`parse_marketplace_source` accepts GitHub shorthand, git URLs (including SSH scp-like syntax), marketplace JSON URLs, and local file/directory paths. An entirely empty (after stripping whitespace) input is rejected immediately with this `MarketplaceError` — it is the friendly prompt shown when the user submits nothing in the add-marketplace flow.
Source
Thrown at libs/code/deepagents_code/plugins/marketplace.py:157
)
def parse_marketplace_source(raw: str) -> MarketplaceSource:
"""Parse a user-provided marketplace source.
Args:
raw: GitHub shorthand, Git URL, marketplace JSON URL, file, or directory.
Returns:
Parsed marketplace source.
Raises:
MarketplaceError: If the source string is empty or unsupported.
"""
value = raw.strip()
if not value:
msg = "Please enter a marketplace source"
raise MarketplaceError(msg)
ssh_match = _SSH_GIT_RE.match(value)
if ssh_match:
return RepositoryMarketplaceSource(
source_type="git", value=ssh_match.group(1), ref=ssh_match.group(2)
)
if value.startswith("http://"):
msg = "Remote marketplace sources must use https"
raise MarketplaceError(msg)
if value.startswith("https://"):
url, _, ref = value.partition("#")
try:
parsed = urlparse(url)
except ValueError as exc:
msg = "Invalid marketplace URL"
raise MarketplaceError(msg) from exc
path = parsed.pathView on GitHub (pinned to a1af029e6e)
Solutions
- Enter a nonempty marketplace source (e.g. `owner/repo`, a git URL, or a path to a marketplace JSON/file/directory).
- If driven by a variable, ensure it is set before invoking: check `echo "$MARKETPLACE_SOURCE"`.
- In scripts, guard with an early check so you never call with an empty string.
Example fix
# before
parse_marketplace_source(os.environ["MKT"]) # MKT unset -> ''
# after
src = os.environ.get("MKT", "").strip()
if not src:
raise SystemExit("MKT must be set to a marketplace source")
parse_marketplace_source(src) Defensive patterns
Strategy: validation
Validate before calling
raw = (user_input or "").strip()
if not raw:
raise SystemExit("Please enter a marketplace source") Try / catch
try:
source = parse_marketplace_source(user_input)
except MarketplaceError as exc:
show_dialog_error(str(exc)) # empty or unsupported source Prevention
- Strip whitespace from user input before parsing.
- In UI flows, disable submit until the source field is nonempty.
- In scripts, fail fast on empty/blank environment variables holding the source.
- Accept the supported forms: `owner/repo`, git/SSH URLs, or a local/remote marketplace JSON path.
When it happens
Trigger: Calling `parse_marketplace_source("")` or with a whitespace-only string; in the UI, submitting the add-marketplace modal with an empty source field.
Common situations: User pressed Enter in the add-marketplace dialog without typing anything; an environment variable or config value intended to hold the source was unset/blank; a script interpolated an empty variable into the source argument.
Related errors
- Installed {plugin_id} but failed to load from cache: {detail
- Marketplace {record.name!r} now declares the name {marketpla
- Plugin {plugin_id} has an unusable source path ({rejections}
- Marketplace URL {_redact_url_credentials(url)} contains plug
- Marketplace URL {_redact_url_credentials(url)} only download
AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29).
Data as JSON: /api/errors/8f9073806dafbdcb.
Report an issue: GitHub.