I had not installed the package python3-gexiv2. Perhaps when I filed the bug, the package python3-gexiv2 didn't exist? I can't say. In any case, I can't locate that package in Leap 42.2. After installing python3-gexiv2 in Tumbleweed, the code works as expected. Because python3-gexiv2 doesn't appear to exist in Leap 42.2, the problem probably still exists in that release.