-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Division by zero error when adding photos #361
Comments
Frist of all you don't need to run maps:scan-photos, after you uploaded pictures. maps:scan-photos will triger a full rescan of all files. When a file is uploaded a scan of this file is automatically scheduled. Related to #123. Can you email me one sample picture, where the error occurs. Than I can see what's the exact problem. Otherwise I can just silence the error message by skipping the image. |
Hi,
Thanks for your reply. I've done a bit more digging, and it looks like an issue with the GPS data on these photos... they seemed to be showing all 000's. Funny thing is that the originals on my phone still had intact GPS data, so i'm not sure where the issue lies.
…--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
https://tutanota.com
16 Apr 2020, 19:12 by [email protected]:
Fist of all you don't need to run maps:scan-photos, after you uploaded pictures. maps:scan-photos will triger a full rescan of all files. When a file is uploaded a scan of this file is automatically scheduled.
Related to > #123 <#123>> .
Can you email me one sample picture, where the error occurs. Than I can see what's the exact problem. Otherwise I can just silence the error message by skipping the image.
—
You are receiving this because you authored the thread.
Reply to this email directly, > view it on GitHub <#361 (comment)>> , or > unsubscribe <https://github.com/notifications/unsubscribe-auth/AIMPMO2BAWK4LAZLMO3FDWLRM3DXRANCNFSM4MJKHKXQ>> .
|
I will close this issue as it seams to be a problem with the exif data. |
I also found some lines in my log with this error: |
Is the same as the other. The pel library is only used once to get exif data. And it is only a backup if the PHP internal function is not working for what ever reason. |
@sirjaymond how did you upload the pictures so the originals had the GPS data but the uploaded ones not? |
I'm so sorry, but the cron job just silently fails because of that, and this is okay for you? No need to check or try-catch, or whatever you have there in php? The leak is on the other side of the boat? |
I'm totally fine by this. I'm programming this in my free time which works for my usecases and you can use for free. You might try to fix the catch block in maps/lib/Service/PhotofilesService.php Line 385 in b2af5dd
It might help to replace PelException with Exception. I'm happy to review your PR. |
No, man, I'm sorry, I have a birthday today, and I have wasted it trying to figure out why my people don't see new files. Last place I thought it could be - is the maps app. |
I'm quite aware of the php docs. Thanks for posting it anyways, have fun on your birthday. |
The issue is still occurring on Maps 0.1.10 in my Nextcloud 24.0.2 install , the line number is now different though
The line is the following:
I manually patched it with the code from #648 and the error is gone now, maybe this PR could be merged? Thanks! |
So I'm getting the below error under the following circumstances:
[PHP] Error: Division by zero at /var/www/html/custom_apps/maps/lib/Service/PhotofilesService.php#407
I have a bunch of photos uploaded to NextCloud. I then add them to the scan job with the following command:
docker exec --user www-data nextcloud php occ maps:scan-photos
The next time the cron job runs, I get the division by zero error, and none of the photos appear on the map.
The error is not happening for photos that I've recently uploaded through the Android app, and these seem to be added to the map just fine.
The photos giving the error were taken previously, and uploaded via the Linux desktop app.
Thanks
The text was updated successfully, but these errors were encountered: