I had a hard time with the 'empty string' error too, finally had to read all the replies. Otherwise it works fine, many thanks, it is a great script.
A small problem: if you blindly add all catalog on a busy area, PI will block for a very long time trying to remove duplicates. This is due to the algorithm used for finding duplicates. I had to kill PI. May be it could be possible to have a limit on the number of objects annotated (with a default that could be very large, but not to the point of blocking PI in the duplicate search), as a security. The duplicate algorithm could be enhanced, but I am not sure this is worth it as the annotation become unreadable due to the overloading of text long before the duplicate search time is a serious problem.
Thanks again -- bitli