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

Unix: Calibre Conversion Hangs when Embed Metadata Enabled #3143

Open
ConstrictM opened this issue Sep 5, 2024 · 0 comments
Open

Unix: Calibre Conversion Hangs when Embed Metadata Enabled #3143

ConstrictM opened this issue Sep 5, 2024 · 0 comments

Comments

@ConstrictM
Copy link

Describe the bug/problem
Attempting to convert a book with embed metadata enabled causes the Calibre ebook-converter to lock due to the calibredb metadata extraction process being locked.

This appears to be due to the p.wait() (convert.py, line 272) not being released until the stdout buffer has been cleared.

From convert.py

269 opf_command = [calibredb_binarypath, 'show_metadata', '--as-opf', str(self.book_id),
270               '--with-library', library_path]
271 p = process_open(opf_command, quotes, my_env)
272 p.wait()
273 check = p.returncode
274 calibre_traceback = p.stderr.readlines()
275 if check == 0:
276     path_tmp_opf = os.path.join(tmp_dir, "metadata_" + str(uuid4()) + ".opf")
277     with open(path_tmp_opf, 'w') as fd:
278         copyfileobj(p.stdout, fd)

To Reproduce

Steps to reproduce the behavior:

  1. Go to any book (that is type EPUB)
  2. Click on 'Edit Metadata'
  3. Set Convert from: EPUB
  4. Set Convert to: AZW3
  5. Go to Tasks to see that conversion is stuck
  6. In processes calibredb process is stuck

Expected behavior

The conversion task does not get stuck an completes as expected.

Environment (please complete the following information):

  • OS: FreeBSD14.1
  • Python version: python3.11
  • Calibre-Web version: 0.6.23
  • Docker container: None
  • Special Hardware: N/A
  • Browser: Chrome 128.0.6613.120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant