Forum

Author Topic: Silent error  (Read 1081 times)

jrjdavidson

  • Newbie
  • *
  • Posts: 23
    • View Profile
Silent error
« on: March 20, 2025, 11:07:13 AM »
I had this line in a script
Code: [Select]
x = chunk.point_cloud.pickPoint(
                camera.center, camera.unproject(point2D))
If camera.center == None, then this function silently exits without throwing an error. It took a bit of frustrating debugging to find the reason why my script stopped without running to its end..

Not sure if this should be a bug report of if it's intentional



Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15465
    • View Profile
Re: Silent error
« Reply #1 on: March 21, 2025, 10:36:40 AM »
Hello jrjdavidson,

What Metashape version you are using?

And what do you mean by silent exit - returning None as a result or script termination (crash)?
Best regards,
Alexey Pasumansky,
Agisoft LLC

jrjdavidson

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Silent error
« Reply #2 on: April 17, 2025, 03:10:59 AM »
Sorry Alexey, didn't see your reply as I didn't get notified when you replied!
 running Metashape-2.2.0-cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl
by silent exit i mean the equivalent of running sys.exit(). No error message or anything of the kind.

vineg

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Silent error
« Reply #3 on: April 17, 2025, 02:13:33 PM »
Hi!

I've seen similar things happen when using multithreading like concurrent.futures.ThreadPoolExecutor
May it be the case?

Regards, Egor