fixing CI issues
Some checks failed
Python CI / test (3.12) (push) Failing after 6m22s
Python CI / test (3.13) (push) Failing after 6m21s

This commit is contained in:
Duncan Tourolle 2025-11-09 15:42:51 +01:00
parent b2ede1c481
commit b1e75528e5
4 changed files with 12 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Mark EPUB files as binary to prevent any text transformations
*.epub binary

View File

@ -70,6 +70,9 @@ class DocumentManager:
except Exception as e:
print(f"Error loading EPUB: {e}")
import traceback
print(f"Full traceback:")
traceback.print_exc()
return False
def load_html(self, html_string: str, title: str = "HTML Document",

View File

@ -48,6 +48,13 @@ class TestSettingsOverlay(unittest.TestCase):
# Test if it's a valid ZIP
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:
with zipfile.ZipFile(test_epub, 'r') as zf:
print(f"Valid ZIP: True")