| 
			
			 | 
		#1 | 
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 6 
				Karma: 10 
				Join Date: Jan 2014 
				
				
				
				Device: iPad 
				
				
				 | 
	
	
	
		
		
			
			 
				
				Error adding new books to Calibre
			 
			
			
			Hello,  
		
	
		
		
		
		
		
		
		
		
		
		
	
	I started getting error messages whenever I try adding any new book to Calibre: calibre, version 1.20.0 WARNING: Failed to read metadata: Failed to read metadata from the following: Erwin Panofsky-Meaning in the Visual Arts.pdf Traceback (most recent call last): File "site-packages\calibre\gui2\add.py", line 136, in start File "site-packages\calibre\gui2\add.py", line 225, in add File "site-packages\calibre\db\legacy.py", line 211, in create_book_entry File "site-packages\calibre\db\cache.py", line 57, in call_func_with_lock File "site-packages\calibre\db\cache.py", line 1379, in create_book_entry File "site-packages\calibre\db\cache.py", line 1153, in set_metadata File "site-packages\calibre\db\cache.py", line 1140, in set_field File "site-packages\calibre\db\cache.py", line 961, in set_field File "site-packages\calibre\db\write.py", line 513, in set_books File "site-packages\calibre\db\write.py", line 437, in many_many File "site-packages\calibre\db\backend.py", line 291, in executemany File "c:\cygwin\home\kovid\sw\build\apsw-3.7.17-r1\src\cursor.c", line 231, in resetcursor ConstraintError: ConstraintError: Foreign key violation: authors is still referenced Before this happened, I had my system (Windows 7 32-bit) crash twice for no clear reason. I don't know if this affected Calibre's functioning. It did not seem to affect any other software. Can someone help me with this please?  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,686 
				Karma: 12595249 
				Join Date: Jun 2009 
				Location: Madrid, Spain 
				
				
				Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Check you database integrity, it looks like something is not OK there.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 6 
				Karma: 10 
				Join Date: Jan 2014 
				
				
				
				Device: iPad 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Calibre finds no errors in the database (if you mean Library Maintenance/Check Library options - or is it something else?)
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | |
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 ![]() You need to (temporarily) disable the PDF metadata reader Preferences  lugins: Metadata READER: Read metadata from PDF files: (click the enable/disable button to get it in the desired state)Apply When the book has been added, you can restore the setting  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 6 
				Karma: 10 
				Join Date: Jan 2014 
				
				
				
				Device: iPad 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			The pdf file was just an example, unfortunately. I get the same error with epub, mobi, azw3 - any format and any book I've tried. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	calibre, version 1.20.0 WARNING: Failed to read metadata: Failed to read metadata from the following: Under My Skin - Doris Lessing.epub Traceback (most recent call last): File "site-packages\calibre\gui2\add.py", line 136, in start File "site-packages\calibre\gui2\add.py", line 225, in add File "site-packages\calibre\db\legacy.py", line 211, in create_book_entry File "site-packages\calibre\db\cache.py", line 57, in call_func_with_lock File "site-packages\calibre\db\cache.py", line 1379, in create_book_entry File "site-packages\calibre\db\cache.py", line 1153, in set_metadata File "site-packages\calibre\db\cache.py", line 1140, in set_field File "site-packages\calibre\db\cache.py", line 961, in set_field File "site-packages\calibre\db\write.py", line 513, in set_books File "site-packages\calibre\db\write.py", line 437, in many_many File "site-packages\calibre\db\backend.py", line 291, in executemany File "c:\cygwin\home\kovid\sw\build\apsw-3.7.17-r1\src\cursor.c", line 231, in resetcursor ConstraintError: ConstraintError: Foreign key violation: authors is still referenced  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			What OS  (the c:\ makes me think some version of Windows)
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 6 
				Karma: 10 
				Join Date: Jan 2014 
				
				
				
				Device: iPad 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Windows 7 32-bit
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 6 
				Karma: 10 
				Join Date: Jan 2014 
				
				
				
				Device: iPad 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Yes, I did try to disable the PDF metadata reader, but the error message is still the same. As for updating, I seem to have the latest version of Calibre installed. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	The files have no DRM protection - and I've tried dozens of files, believe me. Also, I have been using Calibre for years on this PC, without a glitch until this.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 null operator (he/him) 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,018 
				Karma: 30277294 
				Join Date: Mar 2012 
				Location: Sydney Australia 
				
				
				Device: none 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			It looks like the database has been corrupted. You can try rebuilding the database by right clicking the library menu and choosing Library Maintenance->Restore database.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Error adding books to Calibre | dfernandez | Library Management | 0 | 09-12-2012 06:08 PM | 
| Adding books Error | tdwish | Conversion | 4 | 01-22-2012 07:37 AM | 
| Adding Books to Calibre error | Ginnia | Library Management | 4 | 06-07-2011 05:13 AM | 
| error adding books | Beau | Calibre | 5 | 11-02-2010 01:03 PM | 
| Error adding books | Gfinch | Calibre | 2 | 08-03-2008 09:36 PM |