Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnBoundLocalError #234

Closed
thoughtfission opened this issue Mar 15, 2024 · 3 comments
Closed

UnBoundLocalError #234

thoughtfission opened this issue Mar 15, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@thoughtfission
Copy link

Basic information
Some required information from your use case.

  • Operating System: Windows
  • Calibre Version: latest
  • Plugin Installation: From Calibre Latest Stable

Describe the bug
calibre, version 7.7.0
ERROR: Unhandled exception: UnboundLocalError:cannot access local variable 'metadata' where it is not associated with a value

calibre 7.7 embedded-python: True
Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22631')
Python 3.11.5
Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
Interface language: None
EXE path: C:\Program Files\Calibre2\calibre.exe
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 9, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (2, 9, 0) && Annotations (1, 17, 13) && Ebook Translator (2, 3, 1) && Find Duplicates (1, 10, 8) && KFX metadata reader (from KFX Input) (2, 9, 0) && From KFX (2, 9, 0) && KFX Input (2, 9, 0) && Set KFX metadata (from KFX Output) (2, 7, 0) && KFX Output (2, 7, 0) && Kindle Collections (1, 7, 29) && Kindle hi-res covers (0, 5, 1) && Obok DeDRM (7, 2, 1)
Traceback (most recent call last):
File "calibre\gui2_init_.py", line 756, in dispatch
File "calibre_plugins.ebook_translator.lib.conversion", line 269, in translate_done
UnboundLocalError: cannot access local variable 'metadata' where it is not associated with a value

Expected behavior
Trying to save the translated doc and I get this error.

Screenshots
See above

@bookfere bookfere added the bug Something isn't working label Mar 15, 2024
@Givemeaccesss
Copy link

calibre, version 7.7.0
ERRORE: Eccezione non gestita: UnboundLocalError:cannot access local variable 'metadata' where it is not associated with a value

calibre 7.7 embedded-python: True
Windows-10-10.0.22635-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22635')
Python 3.11.5
Windows: ('10', '10.0.22635', 'SP0', 'Multiprocessor Free')
Interface language: it
EXE path: C:\Program Files\Calibre2\calibre.exe
Successfully initialized third party plugins: Ebook Translator (2, 3, 0) && Kobo Metadata (1, 5, 0)
Traceback (most recent call last):
File "calibre\gui2_init_.py", line 756, in dispatch
File "calibre_plugins.ebook_translator.lib.conversion", line 262, in translate_done
UnboundLocalError: cannot access local variable 'metadata' where it is not associated with a value

It gave me the same error even on 2.3.0 version, i think the problem is the main calibre software last version.

bookfere added a commit that referenced this issue Mar 15, 2024
1. Fixed the bug preventing output when file lacks metadata. fixed #234, #233
2. Fixed the bug in processing srt/pgn formats in lower versions of Calibre.
3. Fixed the bug causing disorderly translation when translating ebooks partially.
@bookfere
Copy link
Owner

Thank you for your feedback. We have fixed the issue in version 2.3.2. Please upgrade from Calibre and check if the issue has disappeared. If not, feel free to provide further feedback.

@Givemeaccesss
Copy link

Givemeaccesss commented Mar 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants