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-11-2020, 02:53 AM   #1
sws
Enthusiast
sws began at the beginning.
 
sws's Avatar
 
Posts: 40
Karma: 10
Join Date: Oct 2012
Device: Pocket Book Touch HD3
ReadOnlyError: attempot to write a readonly database

Hi,

I am trying to add several books in a new and empty library, recursive through the whole path, one directory equals one ebook. But I get the following error:

Code:
usr/bin/calibredb --with-library http://localhost:8081 --username=**** --password=**** add  -1 -r /path_to/ebooks/

Traceback (most recent call last):
  File "site-packages/calibre/srv/cdb.py", line 48, in cdb_run
  File "site-packages/calibre/db/cli/cmd_add.py", line 65, in implementation
  File "site-packages/calibre/db/cli/cmd_add.py", line 55, in add_books
  File "site-packages/calibre/db/cache.py", line 1592, in add_books
  File "site-packages/calibre/db/cache.py", line 62, in call_func_with_lock
  File "site-packages/calibre/db/cache.py", line 1552, in create_book_entry
  File "site-packages/calibre/db/backend.py", line 843, in execute
  File "src/cursor.c", line 236, in resetcursor
ReadOnlyError: ReadOnlyError: attempt to write a readonly database

ReadOnlyError: attempt to write a readonly database
The user issuing the command is owner of all directories and files of the path to the ebooks and the new library. So there cannot be a problem with rights management I think.

WARNING: this is calibre Version 3.7.

Any help appreciated.
Regards,
Sebastian
sws is offline   Reply With Quote
Old 06-11-2020, 04:21 AM   #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: 45,252
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the relevant permissions are not for the user running calibredb but for the user running calibre-server
kovidgoyal is offline   Reply With Quote
Advert
Old 06-11-2020, 05:29 AM   #3
sws
Enthusiast
sws began at the beginning.
 
sws's Avatar
 
Posts: 40
Karma: 10
Join Date: Oct 2012
Device: Pocket Book Touch HD3
That's right and he is: owner of directories is the same owner as the one of server process.

One interesting thing: when I issue "calibredb add ..." without the -1 option command runs through without problems. When I include this option (one book per directory) it throws the error above.

EDIT: Just for testing: I changed file permissions to 0777 on both directories but got the same error.

Last edited by sws; 06-11-2020 at 05:56 AM.
sws is offline   Reply With Quote
Old 06-11-2020, 08:24 AM   #4
sws
Enthusiast
sws began at the beginning.
 
sws's Avatar
 
Posts: 40
Karma: 10
Join Date: Oct 2012
Device: Pocket Book Touch HD3
OK, solved it.
1. I stopped calibre server.
2. I copied all books in an empty directory.
3. I adressed calibre to take this directory as library.
4. I restored databas
5. I started calibre server
6. I added books in library directory.

Maybe a bit unorthodox but working. :-)

Regards,
Sebastian
sws is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Touch can not flash, seems readonly scottzhao Kindle Developer's Corner 19 10-05-2014 11:50 PM
/usr/java/lib/fonts is readonly mimihuhu Kindle Developer's Corner 6 04-01-2013 11:42 AM
Kindle Touch: Bricked and readonly filesystem pmugabi Kindle Developer's Corner 6 09-17-2012 01:50 AM
Error: CSSNamespaceRule: namespaceURI is readonly therealjoeblow Conversion 4 09-07-2011 11:50 PM
Readonly Database seanbw Calibre 6 03-17-2010 06:30 PM


All times are GMT -4. The time now is 08:42 PM.


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