Hi,
Thank you for posting your query on Microsoft Community.
As per the description, I understand that you are unable to use Windows photo viewer and getting an error message.
You may try the methods.
Method 1:
I suggest you check the program associations of photo viewer.
1. Press “Windows + X” From keyboard and select Control panel.
2. Go to All control Panel Items and choose “Default Programs”.
3. Go to Set Default program and select photo viewer
4. Unselect all file type too check the result.
Method 2: I suggest you to check if any pending updates and install all windows update.
Follow below steps to check for Windows update and install them.
1. Swipe from the upper-right hand corner of the screen (or if you're using a mouse, move your pointer to the upper-right hand corner of the screen), and then tap or click Search.
2. In the search bar type Windows Update, tap or click Settings, and then tap or click Check for updates.
3. Tap or click Check for updates now. If important updates are available, tap or click Install Updates. If optional updates are available, tap or click Get more info to install them.
Hope this information helps. Please let us know if you need any other assistance with Windows in future. We will be happy to assist you.