Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-17-2011, 11:10 PM   #1
itsmattxp
Member
itsmattxp began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jul 2010
Device: Nook
Library disappeared?

I just recently moved my library to a new directory to keep my books more organized. After I moved the library, all the files were in the designated folder but being the neat freak I am I renamed the folder. Afterwards, all my books don't show up in calibre, however, all the files are still in the folder. I tried to restore my database through calibre library options but I get the message:

calibre, version 0.8.6
ERROR: Failed: Restoring database failed, click Show details to see details

Traceback (most recent call last):
File "site-packages\calibre\library\restore.py", line 102, in run
File "site-packages\calibre\library\restore.py", line 187, in create_cc_metadata
File "site-packages\calibre\library\database2.py", line 189, in __init__
File "site-packages\calibre\library\database2.py", line 138, in connect
ValueError: Path to library too long. Must be less than 75 characters.

itsmattxp is offline   Reply With Quote
Old 06-17-2011, 11:36 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by itsmattxp View Post
I just recently moved my library to a new directory to keep my books more organized. After I moved the library, all the files were in the designated folder but being the neat freak I am I renamed the folder. Afterwards, all my books don't show up in calibre, however, all the files are still in the folder. I tried to restore my database through calibre library options but I get the message:

calibre, version 0.8.6
ERROR: Failed: Restoring database failed, click Show details to see details

Traceback (most recent call last):
File "site-packages\calibre\library\restore.py", line 102, in run
File "site-packages\calibre\library\restore.py", line 187, in create_cc_metadata
File "site-packages\calibre\library\database2.py", line 189, in __init__
File "site-packages\calibre\library\database2.py", line 138, in connect
ValueError: Path to library too long. Must be less than 75 characters.

You did read the sticky?
https://www.mobileread.com/forums/sho...54&postcount=1
The only folder you can rename is the folder that contains all the 'author' folders and Metadata.db

To recover from that change, you simply use the small arrow on the Library Icon and switch/Create to the new folder.

If you tampered with the other folders and files:
theducks is offline   Reply With Quote
Advert
Old 06-18-2011, 05:46 AM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by itsmattxp View Post
File "site-packages\calibre\library\database2.py", line 138, in connect
ValueError: Path to library too long. Must be less than 75 characters.
Make the path to your library folder shorter. Calibre will refuse to use the library in a folder (assuming that there is one) until the full name (from C: or whatever drive) of that folder is less than 75 characters.
chaley is offline   Reply With Quote
Old 06-18-2011, 12:31 PM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
More information: apparently restore_database can attempt to create a library with a path longer than the allowed maximum. This can happen on windows machines where the path to the temp folder is very long, perhaps caused by a very long user name. This problem has been fixed for the next release.

It isn't clear to me if this is the problem you are facing, and if so how to work around this problem in the short term. Probably the best approach is to ask calibre to "open an existing library at a new location" using the switch/create library (menu on the library toolbutton), since the library is probably still good.
chaley is offline   Reply With Quote
Old 06-18-2011, 12:52 PM   #5
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can workaround it by setting the TEMP environment variable to some directory with a short path, but in the OPs case, the correct solution is to use switch to another library as chaley pointed out.
kovidgoyal is offline   Reply With Quote
Advert
Old 06-21-2011, 02:16 AM   #6
itsmattxp
Member
itsmattxp began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jul 2010
Device: Nook
@theducks: Yes, the only thing I changed was the name of the folder that contained my current library. However, after I changed the name of the folder all the books no longer appeared in calibre.

Quote:
Originally Posted by chaley View Post
More information: apparently restore_database can attempt to create a library with a path longer than the allowed maximum. This can happen on windows machines where the path to the temp folder is very long, perhaps caused by a very long user name. This problem has been fixed for the next release.

It isn't clear to me if this is the problem you are facing, and if so how to work around this problem in the short term. Probably the best approach is to ask calibre to "open an existing library at a new location" using the switch/create library (menu on the library toolbutton), since the library is probably still good.
I have tried both troubleshoots that you suggested. I moved the folder with my current library to a path shorter than 75 characters, but that still didn't work. When I choose to open an existing library at the new location, it worked but nothing appeared in my library afterward.

Also, I don't understand why it is saying that the path needs to be shorter than 75 characters. Since the path is already less than 75 characters without me even moving the folder

Last edited by itsmattxp; 06-21-2011 at 02:40 AM.
itsmattxp is offline   Reply With Quote
Old 06-21-2011, 09:17 AM   #7
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
Did you try renaming the folder back to it's original name?

Worst case you can make a new library and reimport your books and if you have the opf files it should give you all of your metadata.

I am pretty sure it is the second option under add books that you use for this.

I did it a few months back and it took only a couple of hours for 9984 books

Helen
speakingtohe is offline   Reply With Quote
Old 06-21-2011, 10:13 AM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by speakingtohe View Post
Did you try renaming the folder back to it's original name?

Worst case you can make a new library and reimport your books and if you have the opf files it should give you all of your metadata.

I am pretty sure it is the second option under add books that you use for this.

I did it a few months back and it took only a couple of hours for 9984 books

Helen
If the OPF files exist in the each of the LIBRARY books folders (this is one of those times to peek )
I recommend: DO NOT Re-Import. Library Maintenance: Restore database
theducks is offline   Reply With Quote
Old 06-21-2011, 11:39 AM   #9
itsmattxp
Member
itsmattxp began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jul 2010
Device: Nook
Quote:
Originally Posted by theducks View Post
If the OPF files exist in the each of the LIBRARY books folders (this is one of those times to peek )
I recommend: DO NOT Re-Import. Library Maintenance: Restore database
An OPF exists in each folder but when I try to restore the database, it won't let me because it says the path is more than 75 characters when it isn't.
itsmattxp is offline   Reply With Quote
Old 06-21-2011, 11:51 AM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by itsmattxp View Post
An OPF exists in each folder but when I try to restore the database, it won't let me because it says the path is more than 75 characters when it isn't.
The path you see may not be the underlying path

XP:
"C:/documents and settings/<original username>/Documents/
is where you are really, looking at 'My Documents'

Other 'trip-ups': use of International characters anywhere in the path name.

Note my comment about 'original' username.
I discovered (was on W7) that renaming a User leaves the folder (ought of sight , normally) with the original name (probably so as to not break all those stored shortcuts).
theducks is offline   Reply With Quote
Old 06-21-2011, 11:58 AM   #11
itsmattxp
Member
itsmattxp began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jul 2010
Device: Nook
Quote:
Originally Posted by theducks View Post
The path you see may not be the underlying path

XP:
"C:/documents and settings/<original username>/Documents/
is where you are really, looking at 'My Documents'

Other 'trip-ups': use of International characters anywhere in the path name.

Note my comment about 'original' username.
I discovered (was on W7) that renaming a User leaves the folder (ought of sight , normally) with the original name (probably so as to not break all those stored shortcuts).
This is the path I have been using but with no luck. C:\Users\XXXXXXX\Desktop\Nook. I can't seem to make it any shorter than that.
itsmattxp is offline   Reply With Quote
Old 06-21-2011, 12:04 PM   #12
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by itsmattxp View Post
This is the path I have been using but with no luck. C:\Users\XXXXXXX\Desktop\Nook. I can't seem to make it any shorter than that.
Don't keep your Library on the Desktop (I believe there is a Trap after a user deleted the Library). Move it to Your(or Public) documents folder.
C:\Users\<username>\
mine is in Public on W7
theducks is offline   Reply With Quote
Old 06-21-2011, 12:07 PM   #13
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Your problem is probably the one discussed in posts 4 and 5 -- the temp directory path is too long. Have you tried Kovid's suggestion of setting the TEMP environment variable before running restore?

Alternatively, you can wait until the end of the week for the next release, which allows a longer temporary file path name.
chaley is offline   Reply With Quote
Old 06-21-2011, 12:11 PM   #14
itsmattxp
Member
itsmattxp began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jul 2010
Device: Nook
Quote:
Originally Posted by chaley View Post
Your problem is probably the one discussed in posts 4 and 5 -- the temp directory path is too long. Have you tried Kovid's suggestion of setting the TEMP environment variable before running restore?

Alternatively, you can wait until the end of the week for the next release, which allows a longer temporary file path name.
I havn't tried Kovid's suggestion because I'm not really sure how to set a TEMP environment variable.

Edit: Moved it to the public documents folder and it still doesn't work.

Last edited by itsmattxp; 06-21-2011 at 01:05 PM.
itsmattxp is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange - Annotations disappeared, library and calibre find no books samysam Sony Reader 1 12-08-2010 05:31 AM
Collections disappeared desertblues Amazon Kindle 6 09-20-2010 06:38 AM
Please Help - My Entire Calibre Library Disappeared Marcy Calibre 17 08-14-2010 09:56 AM
All My Books Disappeared mousetater Calibre 12 07-30-2010 03:13 PM
Reader Library disappeared after upgrade nikev Sony Reader 0 12-19-2009 11:33 PM


All times are GMT -4. The time now is 06:39 PM.


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