ilius / pyglossary

A tool for converting dictionary files aka glossaries. Mainly to help use our offline glossaries in any Open Source dictionary we like on any modern operating system / device.
GNU General Public License v3.0
2.23k stars 237 forks source link

Error while archiving dictionary kobo.zip (Windows 7/64) #294

Closed swe144 closed 3 years ago

swe144 commented 3 years ago

Hello, tell me how to fix this ...

`INFO:pyglossary: [INFO] Writing to Kobo file 'D:\Downloads\dicthtml_English_Swedish.kobo' INFO:pyglossary:Writing to Kobo file 'D:\Downloads\dicthtml_English_Swedish.kobo' [INFO] Using Reader class from BabylonBgl plugin for direct conversion without loading into memory INFO:pyglossary:Using Reader class from BabylonBgl plugin for direct conversion without loading into memory [INFO] Kobo: sorting entries... INFO:pyglossary:Kobo: sorting entries... [INFO] Kobo: writing entries... INFO:pyglossary:Kobo: writing entries... [WARNING] ignored 3 files (data entries) and replaced '<img ...' tags in definitions with placeholde rs WARNING:pyglossary:ignored 3 files (data entries) and replaced '<img ...' tags in definitions with p laceholders

INFO:pyglossary: [INFO] Compressing 'D:\Downloads\dicthtml_English_Swedish.kobo' with 'zip' INFO:pyglossary:Compressing 'D:\Downloads\dicthtml_English_Swedish.kobo' with 'zip' [ERROR] Exception in Tkinter callback: Traceback (most recent call last): File "D:\pyglossary-4.0.11\pyglossary\ui\ui_tk.py", line 216, in CallWrappercall return self.func(args) File "D:\pyglossary-4.0.11\pyglossary\ui\ui_tk.py", line 1433, in convert finalOutputFile = self.glos.convert( File "D:\pyglossary-4.0.11\pyglossary\glossary.py", line 1301, in convert finalOutputFile = self._compressOutput(finalOutputFile, compression) File "D:\pyglossary-4.0.11\pyglossary\glossary.py", line 1219, in _compressOutput return compress(self, filename, compression) File "D:\pyglossary-4.0.11\pyglossary\glossary_utils.py", line 84, in compress error = zipFileOrDir(glos, filename) File "D:\pyglossary-4.0.11\pyglossary\glossary_utils.py", line 44, in zipFileOrDir output, error = subprocess.Popen( File "C:\Users\swe144\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in in it self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\swe144\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _ex ecute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The specified file cannot be found Traceback (most recent call last): File "D:\pyglossary-4.0.11\pyglossary\ui\ui_tk.py", line 216, in CallWrappercall return self.func(args) File "D:\pyglossary-4.0.11\pyglossary\ui\ui_tk.py", line 1433, in convert finalOutputFile = self.glos.convert( File "D:\pyglossary-4.0.11\pyglossary\glossary.py", line 1301, in convert finalOutputFile = self._compressOutput(finalOutputFile, compression) File "D:\pyglossary-4.0.11\pyglossary\glossary.py", line 1219, in _compressOutput return compress(self, filename, compression) File "D:\pyglossary-4.0.11\pyglossary\glossary_utils.py", line 84, in compress error = zipFileOrDir(glos, filename) File "D:\pyglossary-4.0.11\pyglossary\glossary_utils.py", line 44, in zipFileOrDir output, error = subprocess.Popen( File "C:\Users\swe144\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in in it self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\swe144\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _ex ecute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The specified file cannot be found

ERROR:pyglossary:Exception in Tkinter callback: Traceback (most recent call last): File "D:\pyglossary-4.0.11\pyglossary\ui\ui_tk.py", line 216, in CallWrappercall return self.func(*args) File "D:\pyglossary-4.0.11\pyglossary\ui\ui_tk.py", line 1433, in convert finalOutputFile = self.glos.convert( File "D:\pyglossary-4.0.11\pyglossary\glossary.py", line 1301, in convert finalOutputFile = self._compressOutput(finalOutputFile, compression) File "D:\pyglossary-4.0.11\pyglossary\glossary.py", line 1219, in _compressOutput return compress(self, filename, compression) File "D:\pyglossary-4.0.11\pyglossary\glossary_utils.py", line 84, in compress error = zipFileOrDir(glos, filename) File "D:\pyglossary-4.0.11\pyglossary\glossary_utils.py", line 44, in zipFileOrDir output, error = subprocess.Popen( File "C:\Users\swe144\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in in it self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\swe144\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _ex ecute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The specified file cannot be found `

ilius commented 3 years ago

Please remove .zip prefix from output filename. Then create the zip from dicthtml_English_Swedish.kobo directory yourself.

swe144 commented 3 years ago

Actually a stupid question was, sorry. Added 'C:\Program Files (x86)\GnuWin32\bin' to PATH and all worked.

Only the '.kobo' folder is not deleted after archiving for some reason. Can you fix this?

ilius commented 3 years ago

Please try again.

swe144 commented 3 years ago

Please try again.

Already :) Great, thanks for your work, and quick fixes. Everything works, archives and removes tails.