Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-14-2017, 08:26 AM   #181
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,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I cant see why either auth or timeouts would make any difference. I'm wondering if it is the actual cache file being deleted or the entire temp dir.

Maybe stick a deliberate exception in there. Something like (at line 103)

from calibre import walk
raise Exception(str(list(walk(rd.tdir)))


then if you happen to reproduce the error, it will at least tell us if it is a singe file going missing or the entire cache.
kovidgoyal is offline   Reply With Quote
Old 05-14-2017, 08:41 AM   #182
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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@kovid: I found a way to repeat it.
  1. Turn off authentication. The problem happens with authentication on, but this is simpler.
  2. Connect using OPDS. I am using CC but I imagine any OPDS client will work.
  3. Browse to "Title". Covers are visible.
  4. Browse back to the top category list.
  5. In calibre, using "Preferences" stop then start the content server. Do not restart calibre.
  6. In the OPDS client, browse to Title. All the covers are gone. The cache folder is now empty.
It appears that the mtimes dict is not being cleared when the server is stopped.

Last edited by chaley; 05-14-2017 at 08:50 AM. Reason: Correct "mtime" to "mtimes"
chaley is offline   Reply With Quote
Advert
Old 05-14-2017, 08:47 AM   #183
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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The problem happens when using the standard client ("/"). The steps are similar.
  1. Start calibre.
  2. Connect using http://127.0.0.1:8080/. If needed choose a library.
  3. In calibre, using "Preferences" stop then start the content server. Do not restart calibre.
  4. Refresh the web page. The covers are gone.
chaley is offline   Reply With Quote
Old 05-14-2017, 08:59 AM   #184
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,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Good catch, that would explain it. I developed most of the server before the GUI embedded server existed, so I forgot to take into account same process restarts.
kovidgoyal is offline   Reply With Quote
Old 05-14-2017, 09:42 AM   #185
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by kovidgoyal View Post
@Terisa: that is a limitation of the way user defined functions work. Basically they are global, so only the functions from the current library can be active. I'm afraid there isn;t reallya way around that. You should define your functions in every library.
@kovid, They are defined in the library where content server doesn't find them... And calibre Gui doesn't find either after starting content server. I think I'm missing something, later or tomorrow I'll try to catch screenshots.
Terisa de morgan is offline   Reply With Quote
Advert
Old 05-14-2017, 10:59 AM   #186
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,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@Terisa: Huh, that's odd, I'll see if I can reproduce it
kovidgoyal is offline   Reply With Quote
Old 05-14-2017, 11:42 AM   #187
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,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@Terisa: I was able to replicate it.

@chaley: I think Terisa's bug is caused by caching in the template formatter subsystem. Basically, when the server is asked for metadata for a book, the user functions from the currently loaded db in the GUI are used. Since the metadata is coming from a library without the function, the error result is cached. In the future queries from a library with the function return the error result. Since I'm not too familiar with the innards of the template system, I'm not sure what the best approach here is. Thoughts?
kovidgoyal is offline   Reply With Quote
Old 05-14-2017, 12:05 PM   #188
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,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@chaley: From looking at the code, the best approach seems to be to allow TemplateFormatter to take an argument formatter_funcs which defaults to None. When None, it uses the global formatter_funcs, otherwise it uses the local one. Then have each db object keep its own copy of the formatter_funcs() with its funcs loaded. In get_metadata()/proxy_metadata() it will pass in a formatter to the Metadata() object that uses this copy instead of the gloabl formatter_funcs()

I could be way off base, however.
kovidgoyal is offline   Reply With Quote
Old 05-14-2017, 12:11 PM   #189
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by kovidgoyal View Post
@eschwartz: There is currently no way to run the GUI against a server. That is do-able in principle, but requires a lot of work to get right, so it's something for the future. Currently if you want to run the server as a service and the GUI on the same machine, you need to do what I suggested earlier. Create a wrapper script that stops the server before running the GUI and restarts it after quitting. You can have the GUI autostart its embedded server so that the server is down for only a few seconds.
I somehow figured as such.

I'd very much appreciate such a feature before the beta graduates...
Though I suppose I can simply stop/start the service in the same wrapper script I already use for debug logging anyway, still, that is a bit of an ugly workaround which shouldn't be required in production releases.

Quote:
FYI: You should use http://127.0.0.1 not 0.0.0.0 as the server IP address.
Is this like a "calibre won't work" thing, or a best-practices-when-referencing-localhost thing? Because zeroes are easier to type really really fast.

...

It did highlight the fact that using `calibre-debug -g` doesn't seem to have a way to specify the library to start up with the way the main executable does, though whether that is urgent in the backdoor debug version is questionable.

Quote:
That error is caused by an outdated version of mechanize, you need version 3.3
Huh, so it is. I notice you have saved me the effort of flagging it out of date on https://www.archlinux.org/packages -- rebuilding it myself got it to work, despite my use of 0.0.0.0.
eschwartz is offline   Reply With Quote
Old 05-14-2017, 12:12 PM   #190
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Would it be possible, when running the server without a library specified, to default to serving the full list of libraries that the GUI knows about?
eschwartz is offline   Reply With Quote
Old 05-14-2017, 12:20 PM   #191
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,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@eschwartz: it is not going to happen for 3.0 -- making that happen is a *huge* amount of work.

Not using 0.0.0.0 is just good practice. You never know just what you might be conencting to.

No, the server is completely separate from the GUI, it does not know anything about the GUI, does not access its config files, etc. However, I suppose a special exception can be made in this case.
kovidgoyal is offline   Reply With Quote
Old 05-14-2017, 12:27 PM   #192
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,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@eschwartz: There you go
https://github.com/kovidgoyal/calibr...7dfa9de4c53305
kovidgoyal is offline   Reply With Quote
Old 05-14-2017, 12:57 PM   #193
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,189
Karma: 8888888
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by eschwartz View Post

Is this like a "calibre won't work" thing, or a best-practices-when-referencing-localhost thing? Because zeroes are easier to type really really fast.

...
.
Do what I do go to Preferences-sharing over net-advanced and change "the interface to listen for connections" from the default to :: to listen to all ipv4 and ipv6. Then enter
Code:
[::]:portnumber
in your browser.


bernie
gbm is offline   Reply With Quote
Old 05-14-2017, 01:03 PM   #194
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by kovidgoyal View Post
@eschwartz: it is not going to happen for 3.0 -- making that happen is a *huge* amount of work.


Quote:
Not using 0.0.0.0 is just good practice. You never know just what you might be conencting to.
Your general advice is duly noted.

Quote:
No, the server is completely separate from the GUI, it does not know anything about the GUI, does not access its config files, etc. However, I suppose a special exception can be made in this case.
Thanks.

Quote:
Originally Posted by kovidgoyal View Post
Haha, I guess this works too.
eschwartz is offline   Reply With Quote
Old 05-14-2017, 04:39 PM   #195
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,744
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Is there a way to exclude items from the list of categories in Search.

More generally, will future versions of the new server have any support for 'extensions' and 'adaptations', a'la 'plugins' and 'customisation' in the GUI.

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beta testers needed kovidgoyal Calibre 54 05-20-2016 12:34 PM
Windows beta testers needed kovidgoyal Calibre 19 02-08-2016 04:38 PM
Beta testers for calibre 2.0 needed kovidgoyal Calibre 142 05-08-2015 04:44 AM
Arc Updated Jelly Bean release - Beta testers needed kobo-adrian Kobo Tablets 19 05-23-2013 09:32 PM
Web Browsing from the Ebw-1150 - BETA Testers needed Nate the great Fictionwise eBookwise 26 09-21-2008 11:52 PM


All times are GMT -4. The time now is 01:17 PM.


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