Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 09-01-2013, 06:29 PM   #1
msteine1
Junior Member
msteine1 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2013
Device: headless server
Question Headless Server problem: 'NoneType' object has no attribute

Hi there,

calibre is really great, thxs for this software.

I installed calibre on a headless ubuntu server.

Service runs and I can access the calibre service with the URL and loging in is also possible. But if I go to “ALL BOOKS” I get the following error:

Code:
Error: No books found

TypeError: Object # has no method ‘undef’

at Object.printStackTrace.implementation.createException (http://192.168.XXX.123:8080/static/stacktrace.js:81:18)

at Object.printStackTrace.implementation.run (http://192.168.XXX.123:8080/static/stacktrace.js:66:25)

at printStackTrace (http://192.168.XXX.123:8080/static/stacktrace.js:57:62)

at render_error (http://192.168.XXX.123:8080/static/browse/browse.js:134:18)

at booklist (http://192.168.XXX.123:8080/static/browse/browse.js:271:29)

at HTMLDocument. (http://192.168.XXX.123:8080/browse/category/allbooks:33:17)

at Function.jQuery.extend.ready (http://192.168.XXX.123:8080/static/jquery.js:392:9)

at HTMLDocument.DOMContentLoaded (http://192.168.XXX.123:8080/static/jquery.js:745:10)
My library is here -> : /opt/owncloud/…/04_books

I tried it with other permissions (0775) and changed owner and group to root, but no success ;(

If I check the library I get the following message:

Code:
 
calibredb check_library
Traceback (most recent call last):
  File "site.py", line 58, in main
  File "site-packages/calibre/library/cli.py", line 1470, in main
  File "site-packages/calibre/library/cli.py", line 1190, in command_check_library
  File "site-packages/calibre/db/legacy.py", line 63, in __init__
  File "site-packages/calibre/db/backend.py", line 313, in __init__
  File "posixpath.py", line 352, in abspath
  File "posixpath.py", line 61, in isabs
AttributeError: 'NoneType' object has no attribute 'startswith'

Hopefully someone can help me with that.

Martin
msteine1 is offline   Reply With Quote
Old 09-01-2013, 06:41 PM   #2
msteine1
Junior Member
msteine1 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2013
Device: headless server
Ignore the Quote. It seems to me, that library-path=... is a global option and does not help here

Quote:
I think the pathes in my metadata.db are wrong because I copied it from a windows machine where a local instance of calibre is running.
Code:
Tried to fix it with: calibredb library-path /opt/owncloud/.../04_books
But no success and I can't find a helpfile to the library-path command.


Next thing I tried is to restore the database, but no luck either:
Code:
calibredb restore_database -r
Traceback (most recent call last):
  File "site.py", line 58, in main
  File "site-packages/calibre/library/cli.py", line 1470, in main
  File "site-packages/calibre/library/cli.py", line 1246, in command_restore_database
  File "site-packages/calibre/db/restore.py", line 44, in __init__
  File "posixpath.py", line 352, in abspath
  File "posixpath.py", line 61, in isabs
AttributeError: 'NoneType' object has no attribute 'startswith'

Last edited by msteine1; 09-01-2013 at 06:55 PM.
msteine1 is offline   Reply With Quote
Advert
Old 09-01-2013, 07:02 PM   #3
msteine1
Junior Member
msteine1 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2013
Device: headless server
Mmmh and after thinking about this problem I am frightend that I can't do what I intently wanted to do. Namely to keep the whole library with my local calibre and with my server calibre in sync via owncloud. So if in the metadata.db are pathes stored this can't work.

Is there a workaround for this? Perhaps I better make a new thread for this question, what are you guys thinking?
msteine1 is offline   Reply With Quote
Old 09-02-2013, 04:36 AM   #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: 12,440
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by msteine1 View Post
Mmmh and after thinking about this problem I am frightend that I can't do what I intently wanted to do. Namely to keep the whole library with my local calibre and with my server calibre in sync via owncloud. So if in the metadata.db are pathes stored this can't work.
I can't speak for "owncloud", but I do exactly this with dropbox. I do all maintenance on my windows desktop while my server runs on a debian wheezy PVS hosted at linode.

First hint: avoid any distro-provided calibre package. The are often old and broken. Use the official package instead.

Second hint: look at
http://manual.calibre-ebook.com/server.html and
http://manual.calibre-ebook.com/faq....n-linux-server

There are many threads about syncing between a content server and a desktop calibre. Some recent ones are:

https://www.mobileread.com/forums/sho...d.php?t=220950
https://www.mobileread.com/forums/sho...d.php?t=213554
https://www.mobileread.com/forums/sho...d.php?t=212354

You can get a long list by searching in the forum for content server headless
chaley is offline   Reply With Quote
Old 09-02-2013, 04:46 AM   #5
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,792
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
I am thinking he might have problems with syncing a windows based calibre library with a linux based one because of how both OS treat Uppercase lowercase filenames differently but I could be wrong.
Dopedangel is offline   Reply With Quote
Advert
Old 09-02-2013, 04:59 AM   #6
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: 12,440
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Dopedangel View Post
I am thinking he might have problems with syncing a windows based calibre library with a linux based one because of how both OS treat Uppercase lowercase filenames differently but I could be wrong.
Could be, but calibre tries very hard to ensure that the actual files and folders have the same case as what is in the database. If necessary it changes the case of files, even though on an ignore-case filesystem like windows this is unnecessary. I haven't had a letter-case problem in the two years I have run my server on linux synced from windows.
chaley is offline   Reply With Quote
Old 09-02-2013, 03:33 PM   #7
msteine1
Junior Member
msteine1 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2013
Device: headless server
Ok, thanks for your great tips. I am a huge step further now.

What I did:

* Database was corrupt so I generated a new one with the local Calibre
* Although the Caliber Service is running I have to run:
Code:
calibre-server --with-library=owncloud/.../books
msteine1 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AttributeError: 'NoneType' object has no attribute 'split' Thalia Helikon Conversion 1 12-30-2012 08:09 AM
'NoneType' object has no attribute '__getitem__' Steven630 Recipes 2 07-18-2012 09:41 PM
'NoneType' object has no attribute 'tag'? gweminence Calibre 7 09-13-2011 10:03 AM
AttributeError: 'NoneType' object has no attribute 'replace' when trying to add books tilleydog Calibre 16 10-04-2010 04:29 AM
AttributeError: 'NoneType' object has no attribute 'lower manada Calibre 2 08-10-2010 10:54 PM


All times are GMT -4. The time now is 10:50 AM.


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