r4victor / syncabook

📖🎧 A tool for creating ebooks with synchronized text and audio (EPUB3 with Media Overlays)
MIT License
264 stars 27 forks source link

Error when creating book (missing metadata.json) #34

Open seannymurrs opened 3 weeks ago

seannymurrs commented 3 weeks ago

I get the following error when running the create command.

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/syncabook/create.py", line 43, in create_ebook
✔ Using existing SMIL files from /books/mybook/smil.
❗ File metadata.json is not found. Please provide metadata
Title:     with open(metadatafile, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/books/mybook/metadata.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/syncabook", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/syncabook/__main__.py", line 164, in main
    create_ebook(
  File "/usr/local/lib/python3.9/site-packages/syncabook/create.py", line 48, in create_ebook
    metadata['title'] = input('Title: ')
EOFError: EOF when reading a line
r4victor commented 1 week ago

@seannymurrs, If you don't prepare metadata.json before creating the ebook, syncabook will ask you about the metadata (author, title, etc) interactively. It appears you have stdin set to something other than terminal? If so, try creating metadata.json beforehand. Example: https://github.com/r4victor/syncabook/blob/master/tests/resources/civil_disobedience/metadata.json