Exception during rendering of a template

Hi there
Since the upgrade to 1.6 i get an error:

An exception has been thrown during the rendering of a template ("A non-numeric value encountered").
Previous exceptions
* A non-numeric value encountered  (2)

The error message points to a section in the template like this:

{% for image in page.media.images %}
  {% set exif = exif(image.filepath, true) %}
{% endfor %}

The snippet was right from the grav-docs here: https://learn.getgrav.org/16/themes/twig-filters-functions#exif
Do you have any advice what the problem could be? I’m running php7.1.26 and everything works fine with grav 1.5.9.
Regards, Patrick

No one? I still can’t find the cause of the error and any help is very appreciated.

Hi @piridium, what theme is active with this error? Does the error happen regardless of the active theme? I have never used that function myself.

Hi @paulhibbitts
It’s a custom theme which is fairly simple. Just a bunch of twig files.
The function should read the image caption and display it in the lightbox.