Skip to content

Commit bf467f2

Browse files
author
prima
committed
fix: Silenced the log spam now that debugging the errors is complete - leaving code so we can put it in just in case.
1 parent 8bd143f commit bf467f2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

koboldcpp.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,14 +1911,16 @@ def sanitize_spans(line):
19111911
if s0["bbox"].x1 + delta < s1["bbox"].x0 or (s0["flags"], s0["char_flags"], s0["size"],) != (s1["flags"], s1["char_flags"], s1["size"]):
19121912
continue
19131913
except Exception:
1914-
print("Could not check char flags in bbox for similarity")
1914+
pass
1915+
# print("Could not check char flags in bbox for similarity")
19151916

19161917
dashHandler = False
19171918
try:
19181919
if s0["text"].endswith("-") and s1["text"] and s1["text"][0].isalpha():
19191920
dashHandler = True
19201921
except Exception:
1921-
print(f"Failed to check opacity for dash handler on page")
1922+
pass
1923+
# print(f"Failed to check opacity for dash handler on page")
19221924

19231925
if dashHandler:
19241926
s0["text"] = s0["text"][:-1] + s1["text"]
@@ -1949,7 +1951,8 @@ def sanitize_spans(line):
19491951
if s["alpha"] == 0 and ignore_invisible:
19501952
continue
19511953
except Exception:
1952-
print(f"Failed to check opacity for text on page")
1954+
pass
1955+
# print(f"Failed to check opacity for text on page")
19531956
if abs(sbbox & clip) < abs(sbbox) * 0.8:
19541957
continue
19551958
if s["flags"] & 1 == 1:
@@ -2018,7 +2021,8 @@ def format_span(s):
20182021
try:
20192022
bold = (s["flags"] & 16) or (s["char_flags"] & 8)
20202023
except Exception:
2021-
print("Could not check for bold state on page")
2024+
pass
2025+
# print("Could not check for bold state on page")
20222026
italic = s["flags"] & 2
20232027
if bold and italic:
20242028
txt = f"***{txt}***"

0 commit comments

Comments
 (0)