If you get this error:

There is an issue with the default app that tries to open photos. Unless you changed it, the app is Microsoft Photos. You need to go to apps find it and reset and repair it. It may just completely remove itself when it does this but if you choose another app for default photo viewer the issue will be resolved.