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 03-08-2017, 02:03 PM   #1
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,312
Karma: 12117033
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Problem with template functions and library maintenance

Hi,

As I'm much more fluent in python language than template definition, I have a lot of template functions that I call directly in custom columns. I've seen today that, after a library maintenance, the custom columns get broken because the template functions disappear (they are not there when you go into Preferences->Template functions). If you change the library and go back again, the functions are already there.

Is this normal?

Thank you
Terisa de morgan is online now   Reply With Quote
Old 03-08-2017, 03:32 PM   #2
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,867
Karma: 7036359
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
That means that I forgot to load the template functions after the database is closed, vacuumed, then reopened. I will look into fixing it.

Fortunately you have an easy workaround.
chaley is offline   Reply With Quote
Advert
Old 03-08-2017, 03:34 PM   #3
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,312
Karma: 12117033
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you, and yes, easy workaround after the first moment of panic goes away

Last edited by Terisa de morgan; 03-08-2017 at 03:51 PM.
Terisa de morgan is online now   Reply With Quote
Old 03-11-2017, 03:48 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,867
Karma: 7036359
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Kovid accepted the fix, which is now in source. Let me know if it doesn't fix your problem.
chaley is offline   Reply With Quote
Old 03-11-2017, 03:58 PM   #5
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,312
Karma: 12117033
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I'll tell you in the next release, yes (I don't usually run from source). Thank you very much for the fix.
Terisa de morgan is online now   Reply With Quote
Advert
Old 03-11-2017, 04:17 PM   #6
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: 20,794
Karma: 27405122
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
Kovid accepted the fix, which is now in source. Let me know if it doesn't fix your problem.
@chaley - might that also fix the issue that comes up in this this thread ==>> Column to show mags. that are NOT in any virtual Libraries

Seems vaguely similar, the workaround is do library switches or a restart.

BR

Last edited by BetterRed; 03-11-2017 at 06:46 PM.
BetterRed is offline   Reply With Quote
Old 03-11-2017, 04:42 PM   #7
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,867
Karma: 7036359
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
@chaley - should that also fix the issue that comes up in this this thread ==>> Column to show mags. that are NOT in any virtual Libraries

Seems vaguely similar, the workaround is do library switches or a restart.

BR
I don't see why this change would fix anything related to this problem. The fix specifically reloads custom template functions after a check library.

NB: I tried creating a new custom column, "column built from other columns, behaves like tags" with the template {:'virtual_libraries()'}. It is a totally new column using a never-before-used lookup name. I had to restart to see the column at all, and after that it worked fine with no "recursion" error message. I also tried changing the template for an existing custom column and had no problems. I don't know why others are seeing the error. I suspect that people are reusing lookup names, something that is known to be problematic, but that is at best a suspicion.
chaley is offline   Reply With Quote
Old 03-11-2017, 05:47 PM   #8
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: 20,794
Karma: 27405122
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@chaley - as I wrote 'seems vaguely similar'. Had it been the same I would have retracted my suggestion to Alaa that he report his problem as bug, and given him a link to this thread.

my '#location/Location' column is a pre-existing a long text column, not that it's type should make any difference.

I just restored my Test library to Thursday evening my time. I created the 'Has Location' virtual library and the '#virtlib/Virtual Libraries' column and did a restart. Then I added the Virtual Libraries column to the Book List, via right click headers and Show Columns. The first item had the correct value in Virtual Libraries, but the rest (including those with nothing in Location) had a TEMPLATE ERROR ... message. Did a restart and everything was OK.

But as I mentioned, my tests are on my kitchen sink test library. I will redo on a fresh library when I'm less busy. I have a new screen recorder toy - I could try it out at the same time

BR

Last edited by BetterRed; 03-11-2017 at 05:56 PM.
BetterRed is offline   Reply With Quote
Old 03-11-2017, 05:58 PM   #9
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: 20,794
Karma: 27405122
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
NB: I tried creating a new custom column, "column built from other columns, behaves like tags" with the template {:'virtual_libraries()'}.
- my equivalent column is "column built from other columns", i.e. not like tags, would that make a difference? Wouldn't have thought so.

BR
BetterRed is offline   Reply With Quote
Old 03-11-2017, 05:59 PM   #10
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,867
Karma: 7036359
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@BR: my apologies for sounding testy. Life is a bit complicated here ...

Clearly there is something wrong given that several people have seen the problem. My problem is that I can't repeat it so I have no idea where to look. I have tried creating a new column, hiding and restoring a column, and sitting for 5 minutes chanting "ooomm", all without a failure. Eating a bowl of ice cream didn't work either.

If your tests come up with something repeatable then I will be happy to look at it and (I hope) fix it. Or even if things aren't repeatable but provide enough pointers for where to look.
chaley is offline   Reply With Quote
Old 03-11-2017, 05:59 PM   #11
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,867
Karma: 7036359
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
- my equivalent column is "column built from other columns", i.e. not like tags, would that make a difference? Wouldn't have thought so.

BR
It might. The two types go through different code paths. I will look at it.
chaley is offline   Reply With Quote
Old 03-11-2017, 06:06 PM   #12
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: 20,794
Karma: 27405122
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
@BR: my apologies for sounding testy. Life is a bit complicated here ...
No worries - there's a simple one keystroke workaround - Ctrl+R. Go for a walk/bike ride in the park, you have plenty to choose from.

I'll be back by COB tomorrow.

BR
BetterRed is offline   Reply With Quote
Old 03-11-2017, 09:43 PM   #13
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: 20,794
Karma: 27405122
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@chaley - see post #8 in ==>> Column to show mags. that are NOT in any virtual Libraries

Good and not so good news awaits thee.

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Library/Library Maintenance button babyshelley Library Management 2 06-20-2015 01:05 PM
Library maintenance -> Check library mlevin77 Library Management 9 07-22-2014 08:03 PM
template: if one of the tag is something... maybe contains or in_list functions fxp33 Calibre 4 07-19-2014 05:18 AM
Making references to other fields in template functions Ruskie_it Library Management 10 12-21-2011 10:53 PM
Does anyone use "general program mode" template functions? chaley Library Management 0 08-16-2011 11:54 AM


All times are GMT -4. The time now is 02:39 AM.


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