I the Export Menu at the bottom, check the Post-Processing section. Make sure the "After Export" choice isn't blank. Choose "Do Nothing".
Thank you Geoff, but that it was already set to Do Nothing. Unfortunately, I cannot find a solution other than creating a new user on my Mac and then both LR & PS are behaving perfectly...this is challenging though as I'd have to direct the new user at all of my apps and files and this is quite complicated.
You don't happen to have a backup on a different hard drive, do you? (OK, you may have found your solution already as this thread is a couple of months old...but then maybe my workaround will help someone encountering the same difficulties later on)
I just had the very same error - after my original catalogue got corrupted and actually several repair-attempts (and copying the backup file into the original directory) finally resulted in an apparently working catalogue... I could not export any files but got instead this error message:
An internal error has occurred: ?:0: attempt to index a nil value
(Mac OS 10.10.3, LR5.7)
It seems though that the repair-attempts also resulted in a corrupted hard drive (which I thought to have fixed with the Mac Hard Drive tool).
What eventually saved me was: I opened the backup catalogue in LR in its backup-directory. No problem with any type of nil-value during export.
So workaround for now:
1. Daily backups on a different hard drive
2. Remembering this and hoping to always find the latest backup.
Best of luck