fixing CI issues
This commit is contained in:
parent
b2ede1c481
commit
b1e75528e5
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Mark EPUB files as binary to prevent any text transformations
|
||||||
|
*.epub binary
|
||||||
@ -70,6 +70,9 @@ class DocumentManager:
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error loading EPUB: {e}")
|
print(f"Error loading EPUB: {e}")
|
||||||
|
import traceback
|
||||||
|
print(f"Full traceback:")
|
||||||
|
traceback.print_exc()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def load_html(self, html_string: str, title: str = "HTML Document",
|
def load_html(self, html_string: str, title: str = "HTML Document",
|
||||||
|
|||||||
Binary file not shown.
@ -48,6 +48,13 @@ class TestSettingsOverlay(unittest.TestCase):
|
|||||||
|
|
||||||
# Test if it's a valid ZIP
|
# Test if it's a valid ZIP
|
||||||
if test_epub.exists():
|
if test_epub.exists():
|
||||||
|
# Check file magic bytes
|
||||||
|
with open(test_epub, 'rb') as f:
|
||||||
|
first_bytes = f.read(10)
|
||||||
|
print(f"First 10 bytes (hex): {first_bytes.hex()}")
|
||||||
|
print(f"First 10 bytes (ascii): {first_bytes[:4]}")
|
||||||
|
print(f"Is PK header: {first_bytes[:2] == b'PK'}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with zipfile.ZipFile(test_epub, 'r') as zf:
|
with zipfile.ZipFile(test_epub, 'r') as zf:
|
||||||
print(f"Valid ZIP: True")
|
print(f"Valid ZIP: True")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user