View Single Post
Old 12-31-2010, 01:28 AM   #1
Shawn_KY
Junior Member
Shawn_KY began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: iPad
Using Calibre on a NAS

Well, after discovering this wonderful ebook manager, I have tried looking for a way to not have it running on my PC. My eventual goal is for it to be shutdown. I happen to have a DNS321 NAS and have been able to use fun_plug to do a few things to help me reach this goal. Recently, I found a package (version 0.7.34) from a contributor (Peter Lord's repository ) and was able to get this installed and working. (As a sidenote, this did involve loading several dependancies that are not by default loaded on this minimal linux system.)

Now, in order to test the package, I simply opened up Calibre 0.7.35 on my Windows 7 PC and created a new library on my NAS via the GUI. Ran the command line:

Code:
calibre-server --with-library "/mnt/HD_a2/Calibre eBooks" -p 9562
At this point, everything works. I copy over a couple of books, it shows up in the browser, on my iPhone and iPad.

I go ahead and begin copying all of my eBooks over and when I finish, I now receive an error:

Code:
Traceback (most recent call last):
  File "/ffp/bin/calibre-server", line 19, in <module>
    sys.exit(main())
  File "/ffp/lib/calibre/calibre/library/server/main.py", line 114, in main
    db = LibraryDatabase2(opts.with_library)
  File "/ffp/lib/calibre/calibre/library/database2.py", line 153, in __init__
    self.initialize_dynamic()
  File "/ffp/lib/calibre/calibre/library/database2.py", line 354, in initialize_dynamic
    self.refresh()
  File "/ffp/lib/calibre/calibre/library/caches.py", line 630, in refresh
    temp = db.conn.get('SELECT * FROM meta2')
  File "/ffp/lib/calibre/calibre/library/sqlite.py", line 236, in run
    raise DatabaseException(*res)
calibre.library.sqlite.DatabaseException: timestamp out of range for platform time_t
        RemoteTraceback (most recent call last):
          File "/ffp/lib/calibre/calibre/library/sqlite.py", line 200, in run
            ok, res = True, func(*args, **kwargs)
          File "/ffp/lib/calibre/calibre/library/sqlite.py", line 100, in get
            return ans.fetchall()
          File "/ffp/lib/calibre/calibre/library/sqlite.py", line 29, in convert_timestamp
            return parse_date(val, as_utc=False)
          File "/ffp/lib/calibre/calibre/utils/date.py", line 69, in parse_date
            return dt.astimezone(_utc_tz if as_utc else _local_tz)
          File "/ffp/lib/python2.6/site-packages/dateutil/tz.py", line 92, in utcoffset
            if self._isdst(dt):
          File "/ffp/lib/python2.6/site-packages/dateutil/tz.py", line 135, in _isdst
            return time.localtime(timestamp+time.timezone).tm_isdst
        ValueError: timestamp out of range for platform time_t
I have tried copying the database directly to the NAS with all files and folders and also by using the GUI to copy the books (without delete) to the new library. Either way it fails.

Ironically, it does work within the GUI still on the Windows 7 machine.

If I check the date on the NAS, it does return:
Code:
Fri Dec 31 06:23:52 UTC 2010
whereas, the Windows 7 machine is set to EST. I don't think this is the problem as it works when I copy a book or two, but when I copy the entire database or begin to copy it fails...

Ideas or thoughts?
Shawn_KY is offline   Reply With Quote