Unhandled source type provides traceback
Metadata
Current evaluation
Closed. Missing source-type parameters triggered raw ValueErrors instead of SnapcraftErrors. No fix or PR was linked, indicating the report was likely abandoned or resolved in a later release without explicit tracking.
Suggested action: —
No scores available.
Issue body
Using a source without specifying the required source-type raises a ValueError, which results in a traceback:
$ snapcraft
Traceback (most recent call last):
File "/home/kyrofa/venv/snapcraft/bin/snapcraft", line 9, in <module>
load_entry_point('snapcraft', 'console_scripts', 'snapcraft')()
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/pkg_resources/__init__.py", line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
return ep.load()
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2229, in load
return self.resolve()
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2235, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/kyrofa/src/snapcraft/snapcraft/cli/__main__.py", line 19, in <module>
run(prog_name='snapcraft')
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/click/core.py", line 1043, in invoke
return Command.invoke(self, ctx)
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/kyrofa/src/snapcraft/snapcraft/cli/_runner.py", line 72, in run
ctx.forward(lifecyclecli.commands['snap'])
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/click/core.py", line 553, in forward
return self.invoke(cmd, **kwargs)
File "/home/kyrofa/venv/snapcraft/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/kyrofa/src/snapcraft/snapcraft/cli/lifecycle.py", line 139, in snap
project_options, directory=directory, output=output)
File "/home/kyrofa/src/snapcraft/snapcraft/internal/lifecycle/_packer.py", line 45, in snap
execute('prime', project_options)
File "/home/kyrofa/src/snapcraft/snapcraft/internal/lifecycle/_runner.py", line 61, in execute
config = project_loader.load_config(project_options)
File "/home/kyrofa/src/snapcraft/snapcraft/internal/project_loader/__init__.py", line 25, in load_config
return Config(project_options)
File "/home/kyrofa/src/snapcraft/snapcraft/internal/project_loader/_config.py", line 131, in __init__
snapcraft_yaml=self.snapcraft_yaml_path)
File "/home/kyrofa/src/snapcraft/snapcraft/internal/project_loader/_parts_config.py", line 56, in __init__
self._process_parts()
File "/home/kyrofa/src/snapcraft/snapcraft/internal/project_loader/_parts_config.py", line 86, in _process_parts
self.load_part(part_name, plugin_name, properties)
File "/home/kyrofa/src/snapcraft/snapcraft/internal/project_loader/_parts_config.py", line 196, in load_part
confinement=self._confinement)
File "/home/kyrofa/src/snapcraft/snapcraft/internal/pluginhandler/__init__.py", line 94, in __init__
self._part_properties)
File "/home/kyrofa/src/snapcraft/snapcraft/internal/pluginhandler/__init__.py", line 130, in _get_source_handler
self._source, source_type=properties['source-type'])
File "/home/kyrofa/src/snapcraft/snapcraft/internal/sources/__init__.py", line 161, in get_source_handler
source_type = _get_source_type_from_uri(source)
File "/home/kyrofa/src/snapcraft/snapcraft/internal/sources/__init__.py", line 189, in _get_source_type_from_uri
raise ValueError('no handler to manage source ({})'.format(source))
ValueError: no handler to manage source (https://bitbucket.org/klembot/twinejs)
This should probably be a SnapcraftError instead.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed. Missing source-type parameters triggered raw ValueErrors instead of SnapcraftErrors. No fix or PR was linked, indicating the report was likely abandoned or resolved in a later release without explicit tracking. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without documented resolution. The ValueError traceback for unhandled source types was not explicitly fixed or merged. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. The raw ValueError causing unhandled tracebacks was replaced with a proper SnapcraftError to gracefully handle unsupported source types. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed by replacing the raw ValueError with a SnapcraftError to prevent tracebacks when processing unhandled source types, closing the issue. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1650943 Wrong source-type in yaml is ignored | snapcraft (launchpad) | closed | Closed without a documented fix or PR. Invalid source-type values in snapcraft.yaml remain silently ignored, suggesting the bug was abandoned or resolved upstream without tracking. | |
| #1807875 Wrong error when no source specified | snapcraft (launchpad) | closed | Closed without resolution. Reported a misleading error when the source field was omitted from snapcraft.yaml, which should explicitly require the source instead of failing on command execution. |