Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AudioLeadIn not optional #17

Closed
de-odex opened this issue Aug 1, 2017 · 1 comment
Closed

AudioLeadIn not optional #17

de-odex opened this issue Aug 1, 2017 · 1 comment

Comments

@de-odex
Copy link
Contributor

de-odex commented Aug 1, 2017

https://osu.ppy.sh/b/227 :P

Traceback (most recent call last):
  File "C:\Users\deodex\AppData\Local\Programs\Python\Python36\lib\site-packages\slider\library.py", line 243, in lookup_by_id
    return self._read_beatmap(self, beatmap_id=beatmap_id)
  File "C:\Users\deodex\AppData\Local\Programs\Python\Python36\lib\site-packages\slider\library.py", line 216, in _raw_read_beatmap
    return Beatmap.from_path(self._cache[f'id:{beatmap_id}'])
  File "C:\Users\deodex\AppData\Local\Programs\Python\Python36\lib\site-packages\slider\library.py", line 32, in __getitem__
    return d[key]
  File "C:\Users\deodex\AppData\Local\Programs\Python\Python36\lib\dbm\dumb.py", line 148, in __getitem__
    pos, siz = self._index[key]     # may raise KeyError
KeyError: b'id:227'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\deodex\AppData\Local\Programs\Python\Python36\lib\site-packages\slider\beatmap.py", line 767, in _get_as_str
    return mapping[field]
KeyError: 'AudioLeadIn'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bot.py", line 173, in sendpp
    beatmap_data = osu_library.lookup_by_id(beatmap_id, download=True, save=True)
  File "C:\Users\deodex\AppData\Local\Programs\Python\Python36\lib\site-packages\slider\library.py", line 247, in lookup_by_id
    return self.download(beatmap_id, save=save)
  File "C:\Users\deodex\AppData\Local\Programs\Python\Python36\lib\site-packages\slider\library.py", line 360, in download
    beatmap = Beatmap.parse(data.decode('utf-8-sig'))
  File "C:\Users\deodex\AppData\Local\Programs\Python\Python36\lib\site-packages\slider\beatmap.py", line 1608, in parse
    milliseconds=_get_as_int(groups, 'General', 'AudioLeadIn'),
  File "C:\Users\deodex\AppData\Local\Programs\Python\Python36\lib\site-packages\slider\beatmap.py", line 794, in _get_as_int
    v = _get_as_str(groups, section, field, default)
  File "C:\Users\deodex\AppData\Local\Programs\Python\Python36\lib\site-packages\slider\beatmap.py", line 770, in _get_as_str
    raise ValueError(f'missing field {field!r} in section {section!r}')
ValueError: missing field 'AudioLeadIn' in section 'General'
@llllllllll
Copy link
Owner

fixed in 1f090da. thanks for the report!

I think we will uncover more issues like this in older beat maps but I am happy to fix them.

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

No branches or pull requests

2 participants