Over in
https://www.mobileread.com/forums/showthread.php?t=242683, someone has found a bug in the "Fix duplicate shelves" function. This is happening because the shelf/collection names is null in the database. I have no idea how that could happen, but it was causing a problem in the plugin. I have made a change to put display "(Unnamed shelf)" as the shelf name in this case.
I am still posting this as a test version. It uses the changes for the Qt5 beta versions of calibre, but will work with the released versions. The only change from the last beta version is to handle the above error. I will probably be releasing this early next week.