Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 04-27-2015, 01:39 AM   #1
mihal.v
Junior Member
mihal.v began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2013
Device: Kindle Touch 3G / iPad Air2
Question Failed to embed metadata

What does mean the following error message when trying to embed metadata?

Quote:
calibre, version 2.25.0
WARNING: Failed for some files: Failed to embed metadata into some book files. Click "Show details" for details.

The PDF format of Photoshop CS6: Visual QuickStart Guide:

Traceback (most recent call last):
File "site-packages\calibre\customize\ui.py", line 365, in set_file_type_metadata
File "site-packages\calibre\customize\builtins.py", line 502, in set_metadata
File "site-packages\calibre\ebooks\metadata\pdf.py", line 160, in set_metadata
File "site-packages\calibre\utils\podofo\__init__.py", line 41, in set_metadata
Exception: Failed to set PDF metadata: Traceback (most recent call last):
File "site-packages\calibre\utils\ipc\simple_worker.py", line 274, in main
File "site-packages\calibre\utils\podofo\__init__.py", line 57, in set_metadata_
Error: ePdfError_InvalidDataType
Ebook file has all security permissions.

Last edited by mihal.v; 04-27-2015 at 01:43 AM.
mihal.v is offline   Reply With Quote
Advert
Old 04-27-2015, 11:16 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 31,290
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It means there is something about that PDF that causes PoDoFo to fail when trying to write updated metadata. Impossible to say what it is without access to the PDF.
kovidgoyal is online now   Reply With Quote
Old 07-11-2015, 03:50 AM   #3
canpolat
Connoisseur
canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.
 
Posts: 74
Karma: 17950
Join Date: Mar 2013
Device: Sony Reader PRS T1
I also have this problem with some of the PDFs in my library.

Code:
calibre, version 2.31.0
WARNING: Failed for some files: Failed to embed metadata into some book files. Click "Show details" for details.

The PDF format of İskandinav Hikâyeleri Antolojisi:

Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 365, in set_file_type_metadata
    plugin.set_metadata(stream, mi, ftype.lower().strip())
  File "/usr/lib/calibre/calibre/customize/builtins.py", line 502, in set_metadata
    set_metadata(stream, mi)
  File "/usr/lib/calibre/calibre/ebooks/metadata/pdf.py", line 160, in set_metadata
    return podofo_set_metadata(stream, mi)
  File "/usr/lib/calibre/calibre/utils/podofo/__init__.py", line 41, in set_metadata
    raise Exception('Failed to set PDF metadata in (%s): %s'%(mi.title, e.orig_tb))
Exception: Failed to set PDF metadata in (İskandinav Hikâyeleri Antolojisi): Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/utils/ipc/simple_worker.py", line 274, in main
    res = {'result':func(*args, **kwargs)}
  File "/usr/lib/calibre/calibre/utils/podofo/__init__.py", line 57, in set_metadata_
    p.open(u'input.pdf')
Error: An internal error occurred.
Here is an example file: [Removed the file since the problem is solved.]

I have this problem in multiple files. I wonder if there is a way to fix this?

Last edited by canpolat; 07-11-2015 at 11:25 AM. Reason: Removed file link.
canpolat is offline   Reply With Quote
Old 07-11-2015, 06:24 AM   #4
Divingduck
Guru
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 866
Karma: 1216240
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
This happens because you have in your example a protected PDF file.
Divingduck is offline   Reply With Quote
Old 07-11-2015, 07:29 AM   #5
canpolat
Connoisseur
canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.
 
Posts: 74
Karma: 17950
Join Date: Mar 2013
Device: Sony Reader PRS T1
@Divingduck: Thank you for the response. Do you know if there is a simple way to bulk-remove this sort of protection (within or outside Calibre)? I'm on Linux, by the way...

Last edited by canpolat; 07-11-2015 at 07:31 AM. Reason: Added platform.
canpolat is offline   Reply With Quote
Advert
Old 07-11-2015, 07:33 AM   #6
canpolat
Connoisseur
canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.
 
Posts: 74
Karma: 17950
Join Date: Mar 2013
Device: Sony Reader PRS T1
I found this: http://stackoverflow.com/questions/1...files#14233759

I'll try and report back as soon as I can.
canpolat is offline   Reply With Quote
Old 07-11-2015, 12:21 PM   #7
canpolat
Connoisseur
canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.canpolat for a long time would go to bed early.
 
Posts: 74
Karma: 17950
Join Date: Mar 2013
Device: Sony Reader PRS T1
In case someone else stubmles accross this thread here is the solution. I ended up using qpdf:

Code:
qpdf --decrypt myfile.pdf decrypted.pdf
canpolat is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about 'Embed metadata' tool MartyTX Conversion 7 04-01-2015 04:44 PM
Embed Metadata - Question, Suggestion and Error ichbindasauge Calibre 2 07-24-2014 03:02 AM
Adding comments to embed metadata MichelleB Conversion 7 07-18-2014 11:13 AM
'Embed metadata' tool errors kabirmaar Calibre 2 06-23-2014 02:30 AM
Failed to download metadata (both metadata & cover) EddieSean Calibre 0 01-31-2013 09:49 PM


All times are GMT -4. The time now is 02:47 AM.


MobileRead.com is a privately owned, operated and funded community.