fix osuparser sliderborder
+import logging
import math
import re
@@ -103,6 +104,7 @@ class Beatmap:
timing = timing.split("\n")
inherited = 0
for line in timing:
+ try:
line = line.strip()
if line == '':
continue
@@ -119,6 +121,9 @@ class Beatmap:
my_dict["SampleSet"] = items[3]
my_dict["SampleIndex"] = items[4]
my_dict["Volume"] = float(items[5])
+ except Exception as e:
+ logging.error(repr(e))
+ continue
# my_dict["Kiai"] = int(items[7])
self.timing_point.append(my_dict)
self.timing_point.append({"Offset": float('inf')})
@@ -480,7 +485,7 @@ def split(delimiters, string):
return info
-def read_file(filename, scale, colors, hr):
+def read_file(filename, scale=1, colors=None, hr=False):
fiel = open(filename, "r", encoding="utf-8")
content = fiel.read()
delimiters = ["[General]", "[Editor]", "[Metadata]", "[Difficulty]", "[Events]", "[TimingPoints]", "[Colours]",
