LRU1 commited on
Commit
3eb1399
·
1 Parent(s): da9cb3e

fix img_path is not Path

Browse files
Files changed (1) hide show
  1. lec2note/processing/processor.py +1 -0
lec2note/processing/processor.py CHANGED
@@ -23,6 +23,7 @@ class Processor: # noqa: D101
23
 
24
  @staticmethod
25
  def _img_to_data_uri(img_path: Path) -> str:
 
26
  mime, _ = mimetypes.guess_type(img_path)
27
  b64 = base64.b64encode(img_path.read_bytes()).decode()
28
  return f"data:{mime};base64,{b64}"
 
23
 
24
  @staticmethod
25
  def _img_to_data_uri(img_path: Path) -> str:
26
+ img_path = Path(img_path)
27
  mime, _ = mimetypes.guess_type(img_path)
28
  b64 = base64.b64encode(img_path.read_bytes()).decode()
29
  return f"data:{mime};base64,{b64}"