soimort/you-get · error · AssertionError
no stream selected
Error message
no stream selected
What it means
best_quality_stream_id walks the MissEvan stream_types preference list and returns the first type id present in the available streams mapping; if none of the preferred ids exist in streams, it raises AssertionError('no stream selected'). This means the API responded, but every advertised quality the extractor knows about is absent for this sound.
Source
Thrown at src/you_get/extractors/missevan.py:115
def is_covers_stream(stream):
stream = stream or ''
return stream.lower() in ('covers', 'coversmini')
def get_file_extension(file_path, default=''):
url_parse_result = urllib.parse.urlparse(file_path)
_, suffix = os.path.splitext(url_parse_result.path)
if suffix:
# remove dot
suffix = suffix[1:]
return suffix or default
def best_quality_stream_id(streams, stream_types):
for stream_type in stream_types:
if streams.get(stream_type['id']):
return stream_type['id']
raise AssertionError('no stream selected')
class MissEvanWithStream(VideoExtractor):
name = 'MissEvan'
stream_types = missevan_stream_types
def __init__(self, *args):
super().__init__(*args)
self.referer = 'https://www.missevan.com/'
self.ua = _UA
@classmethod
def create(cls, title, streams, *, streams_sorted=None):
obj = cls()
obj.title = title
obj.streams.update(streams)
streams_sorted = streams_sorted or cls._setup_streams_sorted(streams)View on GitHub (pinned to 049548f3f3)
Solutions
- Dump the streams mapping and stream_types to see which ids are actually available for the failing track
- Update the missevan_stream_types list in the extractor to include the new ids returned by the API
- If streams is empty, the track is likely paid/region-locked — try another track or a logged-in session
- Pass an explicit stream id/quality kwarg if the caller supports selection, bypassing 'best' selection
Example fix
# before
def best_quality_stream_id(streams, stream_types):
for stream_type in stream_types:
if streams.get(stream_type['id']):
return stream_type['id']
raise AssertionError('no stream selected')
# after (fall back to any available stream)
def best_quality_stream_id(streams, stream_types):
for stream_type in stream_types:
if streams.get(stream_type['id']):
return stream_type['id']
if streams:
return next(iter(streams))
raise AssertionError('no stream selected') Defensive patterns
Strategy: fallback
Validate before calling
def missevan_pick_stream(streams, stream_types):
for st in stream_types:
if streams.get(st['id']):
return st['id']
return next(iter(streams), None) # None signals nothing available Try / catch
try:
missevan_download(url, ...)
except AssertionError as e:
if 'no stream selected' in str(e):
print('track has no known quality tiers; likely paid/region-locked')
else:
raise Prevention
- Inspect the streams mapping returned by the API before assuming a quality exists
- Update the static stream_types list when MissEvan ships new tiers
- Empty streams usually means access-restricted audio — check entitlement, not code
When it happens
Trigger: A MissEvan track whose streams dict contains only ids not covered by missevan_stream_types (new quality tiers, or empty streams for region/paid-locked audio); calling the helper directly with a streams mapping whose keys don't intersect stream_types ids.
Common situations: MissEvan adding a new bitrate/codec tier and deprecating old ids; paid or VIP-only sounds returning an empty stream map; extractor's static stream_types list drifting behind the live API.
AI-assisted analysis of soimort/you-get@049548f3f3 (2026-08-15).
Data as JSON: /api/errors/9be57b29cf8d4b9c.
Report an issue: GitHub.