MaxOhn / rosu-pp-py

osu! difficulty and pp calculation for all modes
MIT License
23 stars 19 forks source link

`builtins.PerformanceAttributes` object has no attribute `pp_accuracy` #6

Closed Yuri-YuzuChaN closed 5 months ago

Yuri-YuzuChaN commented 6 months ago

This can be due to the following reason:

pf = Performance(**data)
attrs = pf.calculate(self.map)
obj = {
    "StarRating": attrs.difficulty.stars,
    "CS": beatmap.cs,
    "HP": beatmap.hp,
    "AR": beatmap.ar,
    "OD": beatmap.od,
    "Aim": attrs.difficulty.aim,
    "Speed": attrs.difficulty.speed,
    "aim": attrs.pp_aim,
    "speed": attrs.pp_speed,
    "accuracy": attrs.pp_accuracy,             # <- here
    "flashlight": attrs.pp_flashlight,
    "effective_miss_count": attrs.effective_miss_count,
    "pp": attrs.pp
}

The name of property of PerformanceAttributes should be pp_acc, instead of pp_accuracy:

https://github.com/MaxOhn/rosu-pp-py/blob/f0f08fe9c9a94331840db67d5cf3b9b8cd15ea55/rosu_pp_py.pyi#L896-L902

VSCode screenshot:

94343c8ef78357fa509b1478d869771f

MaxOhn commented 6 months ago

Would've surprised me if I didn't mess up for those at least once 😅 Will get to fixing it soon 👍

MaxOhn commented 5 months ago

Fix released in v1.0.1 🎉