Custom column Formats error

Bug #1233330 reported by Dragan Petrovic on 2013-09-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Since version 1.0 I have problem with custom column "Formats", created with {formats} template.

Sometimes (but not always) after editing metadata, field in Formats column becomes empty (blank). After restart, everything seems correct and library check passes without hitch.

Few days ago, i deleted all setup related to Formats column, and created new one, with {:'approximate_formats()'} template. Problem is still there, I think, with small difference - field is not empty anymore, it have error message:

TEMPLATE ERROR can't downgrade SHLock object

After restart everything is fine, all formats are there...

And related to bug:
as far as I know, I don't have any DRM removal plugin.

Dragan Petrovic (dragan-p) wrote :

That's a strange error. It will likely be realted to something in your
calibre setup. First step is to disable any third party plugins you
might have in Preferences->Plugins and then see if the error goes away.

If you can think of anything else in your setup that might be
unusual/different from the default, it would help.

ANother thing that would help is if you could identify an exact set of
steps that causes the problem with high probability.

 status incomplete

Changed in calibre:
status: New → Incomplete
Dragan Petrovic (dragan-p) wrote :

Unfortunately, I cant figure it out how to reproduce bug with 100% chance. It popups from time to time, I cant notice any visible pattern.

Also, I cant disable any of my plugins. All of them are User Interface Action plugins, and when I try do disable them, Calibre reports that "Disabling is not allowed"? I am attaching screenshot with list of my plugins.

So, what to do now? Complete reinstallation looks like my only option?

Kovid Goyal (kovid) wrote :

UNinstall the plugins rather than deleting them. You can re-install
afterwards and your plugin settings should be preserved.

Also do the debugging steps in the bug report you linked to earlier:

1) Turn on the newdb_debug_locking = True plugin tweak
2) run calibre in debug mode (right click the preferences button) and
post the log after you notice such an error

Dragan Petrovic (dragan-p) wrote :

Log file is attached (plugins was not uninstalled)

My steps leading to error was:

Edit button, removing of epub, and adding another file (also epub), then click on OK button.

Message "TEMPLATE ERROR can't downgrade SHLock object" was there.

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Incomplete → Fix Released
Dragan Petrovic (dragan-p) wrote :

Seems solved, there is no error anymore. Thank you!

With Calibre 1.6 I still have this error. For me it only surfaces during the adding of a book. I didn't have the DeDRM plugin when the problem started. As a test I installed DeDRM to see if the error goes away. Unfortunately not.

I defaulted to all standard plugins with: metadata plugin metadata plugin
-google image Cover search

Kovid Goyal (kovid) wrote :

When you say this error, you mean your formats column shows "TEMPLATE ERROR can't downgrade SHLock object"?

If so, update to calibre 1.7, which will be released tomorrow and then generate the debug log, as described above after the error occurs.

Dragan Petrovic (dragan-p) wrote :

I dont know is it related to this bug or is it the new one, but I cant start version 1.7 of calibre:

calibre, version 1.7.0
ERROR: Bad database location: Bad database location u'D:\\Media\\ebooks\\main'. calibre will now quit.

Traceback (most recent call last):
  File "site-packages\calibre\gui2\", line 225, in initialize_db_stage2
  File "site-packages\calibre\db\", line 71, in __init__
  File "site-packages\calibre\db\", line 116, in __init__
  File "site-packages\calibre\db\", line 57, in call_func_with_lock
TypeError: release() takes exactly 1 argument (4 given)

After that, I reinstalled version 1.6 and everything is ok - main library is fine.

I'm guessing you still have the tweak to debug locking issues turned on,
turn it off and you will be able to use 1.7.

Dragan Petrovic (dragan-p) wrote :

True, it works now.

Thank you!

After upgrading to 1.7 I do not have the "TEMPLATE ERROR can't downgrade SHLock object" anymore.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers