noDRM / DeDRM_tools

DeDRM tools for ebooks
7.15k stars 320 forks source link

Error 22 when checking zip archive - Invalid Argument #278

Open jshziris2023 opened 1 year ago

jshziris2023 commented 1 year ago

Question / bug report

Encountered "Error 22" When trying to remove DRM. Please see log.

Which version of Calibre are you running?

6.12

Which version of the DeDRM plugin are you running?

v10.0.3

If applicable, which version of the Kindle software are you running?

No response

Log output

ApplicationPaletteChange event ignored
Using calibre Qt style: True
ApplicationPaletteChange event received
calibre Debug log
calibre 6.12  embedded-python: True
Windows-10-10.0.19044-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19044')
Python 3.10.1
Windows: ('10', '10.0.19044', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 3)
calibre 6.12  embedded-python: True
Windows-10-10.0.19044-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19044')
Python 3.10.1
Windows: ('10', '10.0.19044', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 3)
QPA platform: windows
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 81.48370927318295 x 82.13173652694611
[0.00] Starting up...
[0.00] Showing splash screen...
[0.28] splash screen shown
[0.28] Initializing db...
[0.30] db initialized
[0.30] Constructing main UI...
Screens currently in system:
{'depth': 32,
 'device_pixel_ratio': 1.0,
 'geometry_in_logical_pixels': {'height': 1080, 'width': 2560, 'x': 0, 'y': 0},
 'index_in_screens_list': 0,
 'manufacturer': '',
 'model': '',
 'name': 'LG HDR WFHD',
 'serial': '',
 'size_in_logical_pixels': {'height': 1080, 'width': 2560},
 'virtual_geometry': {'height': 1080, 'width': 2560, 'x': 0, 'y': 0}}
Restoring geometry for: calibre_main_window_geometry
{'frame_geometry': {'height': 512, 'width': 1204, 'x': 1097, 'y': 395},
 'full_screened': False,
 'geometry': {'height': 481, 'width': 1204, 'x': 1097, 'y': 426},
 'maximized': False,
 'normal_geometry': {'height': 481, 'width': 1204, 'x': 1097, 'y': 426},
 'screen': {'depth': 32,
            'device_pixel_ratio': 1.0,
            'geometry_in_logical_pixels': {'height': 1080,
                                           'width': 2560,
                                           'x': 0,
                                           'y': 0},
            'index_in_screens_list': 0,
            'manufacturer': '',
            'model': '',
            'name': 'LG HDR WFHD',
            'serial': '',
            'size_in_logical_pixels': {'height': 1080, 'width': 2560},
            'virtual_geometry': {'height': 1080,
                                 'width': 2560,
                                 'x': 0,
                                 'y': 0}}}
Matching screen: {'depth': 32,
 'device_pixel_ratio': 1.0,
 'geometry_in_logical_pixels': {'height': 1080, 'width': 2560, 'x': 0, 'y': 0},
 'index_in_screens_list': 0,
 'manufacturer': '',
 'model': '',
 'name': 'LG HDR WFHD',
 'serial': '',
 'size_in_logical_pixels': {'height': 1080, 'width': 2560},
 'virtual_geometry': {'height': 1080, 'width': 2560, 'x': 0, 'y': 0}}
Setting widget geometry to: {'height': 481, 'width': 1204, 'x': 1097, 'y': 426}
[1.41] main UI initialized...
[1.42] Hiding splash screen
Starting QuickView
DeDRM v10.0.3: Trying to decrypt The Public Speaking Bible_ a Survival Guide for Standing on Stage (2020) - Alexander, Marcus.epub
DeDRM v10.0.3: Verifying zip archive integrity
DeDRM v10.0.3: Error '22' when checking zip archive
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 178, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1067, in run
  File "calibre_plugins.dedrm.__init__", line 330, in ePubDecrypt
  File "C:\Users\Iris\AppData\Roaming\calibre\plugins\DeDRM.zip\zipfix.py", line 160, in fix
  File "C:\Users\Iris\AppData\Roaming\calibre\plugins\DeDRM.zip\zipfilerugged.py", line 828, in read
  File "C:\Users\Iris\AppData\Roaming\calibre\plugins\DeDRM.zip\zipfilerugged.py", line 853, in open
OSError: [Errno 22] Invalid argument
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 436, in get_file_type_metadata
  File "calibre\customize\builtins.py", line 176, in get_metadata
  File "calibre\ebooks\metadata\epub.py", line 216, in get_metadata
  File "calibre\ebooks\metadata\epub.py", line 164, in get_zip_reader
  File "calibre\ebooks\metadata\epub.py", line 147, in __init__
  File "calibre\ebooks\metadata\epub.py", line 98, in __init__
  File "calibre\ebooks\metadata\epub.py", line 152, in open
  File "calibre\utils\zipfile.py", line 1005, in read
  File "calibre\utils\zipfile.py", line 1035, in open
OSError: [Errno 22] Invalid argument
[3.58] splash screen hidden
[3.58] Started up in 3.58 seconds with 0 books
stdout+stderr from file dialog helper: [b'', b'']
piped data from file dialog helper: [b'jQ|\xb9\xaef\x9bm>P\x1c\xf3\xb6?\xb2\x89)\xab\xdb%*T^\xcaT\x90w\x8cH\x9a\xd7\xa0', b'F:\\Learning\\Reading\\Z-FUNCTIONAL LEARNING\\Communication & Public Speaking\\The Public Speaking Bible_ a Survival Guide for Standing on Stage (2020) - Alexander, Marcus.epub']
Added The Public Speaking Bible a Survival Guide for Standing on Stage (2020) to db in: 1.3
WARNING: Epub doesn't contain a valid mimetype declaration
ElleKayEm commented 1 year ago

Looks like it's not a type of epub that DeDRM recognizes. Is it Adobe DRM or Nook?

jshziris2023 commented 1 year ago

It's Adobe DRM. I guess there's nothing I can do then?

ElleKayEm commented 1 year ago

Seems like there's something off about that book. DeDRM should recognize and work for Adobe DRM. How did you download it?