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

Mania Hold Notes Cannot be Parsed #116

Open
120-cell opened this issue Dec 11, 2023 · 3 comments
Open

Mania Hold Notes Cannot be Parsed #116

120-cell opened this issue Dec 11, 2023 · 3 comments

Comments

@120-cell
Copy link

The parser for mania hold notes assumes that endTime and hitSample are separated by a comma, when they are actually separated by a colon.

The result is

ValueError: end_time should be an int, got '5973:0:0:0:0:'
@tybug
Copy link
Collaborator

tybug commented Dec 11, 2023

can you share a beatmap id that reproduces this?

@120-cell
Copy link
Author

120-cell commented Dec 12, 2023

https://osu.ppy.sh/beatmapsets/2078794#mania/4353819
As far as I can tell, any map with a hold note will cause this issue.

I'm using the AUR release, maybe that changes things, but this code looks the same as on my installation:

slider/slider/beatmap.py

Lines 977 to 991 in 040e17f

def _parse(cls, position, time, hitsound, new_combo, combo_skip, rest):
try:
end_time, *rest = rest
except ValueError:
raise ValueError('missing end_time')
try:
end_time = timedelta(milliseconds=int(end_time))
except ValueError:
raise ValueError(f'end_time should be an int, got {end_time!r}')
if len(rest) > 1:
raise ValueError('extra data: {rest!r}')
return cls(position, time, hitsound, end_time, new_combo, combo_skip,
*rest)

@120-cell
Copy link
Author

replacing

end_time, *rest = rest

with

end_time_hit_sample, *rest = rest
end_time, *hit_sample = end_time_hit_sample.split(':')

fixed it for me.

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