"Multiple addons with the same name found!" - added list of duplicates with delete button
AbandonedPublic

Authored by Greg Zaal (gregzaal) on Sep 14 2014, 4:42 PM.

Details

Summary

Currently when there are multiple copies of the same addon (such as one in master and one that was installed manually), an error is shown in the Addons tab of the user preferences stating "Multiple addons with the same name found! / likely a problem with the script search path. / (see console for details)". The user then has to open the console (or on linux/mac, restart blender from a terminal), read through the big mess of text and figure out where the duplicates are and then go delete one of them manually.

This patch attempts to improve the usability of how the user would solve this issue.

It lists the addons that have duplicates, and then lists the two duplicate files, providing a delete button to remove those files and resolve the issue directly in Blender.

I couldn't find an existing operator that could delete a file given only its path, so I wrote one at the top of space_userpref.py. I'm pretty sure that's not the right place for such an operator, but I don't know where is. The operator also removes the item in the addon_utils.error_duplicates list corresponding to the addon.

Finally, one limitation: if there are more than two duplicates of the same addon, it'll only show one pair in the list. When you delete one of the two, it'll appear as if the problem is solved, however when restarting blender next it'll show the error again, this time with a different pair of files. How it detects the duplicate modules confuses me a bit, so I couldn't think of a way to solve this.

Diff Detail

Greg Zaal (gregzaal) retitled this revision from to "Multiple addons with the same name found!" - added list of duplicates with delete button.Sep 14 2014, 4:42 PM
Greg Zaal (gregzaal) updated this object.
Greg Zaal (gregzaal) set the repository for this revision to rB Blender.

I can see why you might want to do this, but addons can also be directories (packages), and those directories don't necessarily have write permissions.

In corner cases, deleting may be incorrect (one addon may be accessed from 2+ paths, via symlinks) - so deleting the file may remove both.

This is an exceptional case, its possible for users to end up in this situation (hence the warning), but I rather keep this as something the user resolves outside of Blender in a file manager.

can we have a solution to see the duplicate addons?
Maybe one button "Duplicate addons" under Support level area.
Thank you. Regards.

One intermediate solution is to just have them listed there without the removal operator.
To save space they could be under a expandable prop.

I can apply the UI part of this patch, so that people are at least capable of finding out what's going on without checking the console.

I can apply the UI part of this patch, so that people are at least capable of finding out what's going on without checking the console.

If you can do that with a UI then is great ( I don't want to make changes into Blender 3D over development team).

Greg Zaal (gregzaal) commandeered this revision.Oct 2 2016, 3:02 PM
Greg Zaal (gregzaal) updated this revision to Diff 7542.

Updated diff to only include UI, no delete operator.

Made some changes to the patch.

Added support for UTF-8 errors, add-on duplicates files group the files including the user script folder, reorganized the UI with the show/hide buttons, clearer output in the console.

https://github.com/lijenstina/Experiments-with-patch-D791-Displaying-Addon-errors-in-the-UI


I would really appreciate simple list with names of duplicated add-ons if there is not conclusion for additional features like direct remove. As written in the initial post, especially Linux/Mac users has to almost graduate just to find the conflict addons. Simple list is not the best solution for beginners that has to discover were add-ons installed from file are stored first, but since you know just the name, any OS can find add-on via its name. Please don't wait another year. We will be glorify you just for simple list of names.

This revision is now accepted and ready to land.Feb 26 2017, 5:57 PM