zsiki / Find-GCP

Find ArUco markers in digital photos
GNU General Public License v2.0
66 stars 17 forks source link

If there is no GCP on an image, the program crashes with a TypeError #10

Closed gromain closed 2 years ago

gromain commented 2 years ago

Hey there,

I started using your program and it's great! However, I found an issue, where if an image has no GCP a None object is pushed in the self.gcps list. This leads to a crash when the program tries to iterate over this None list.

The full traceback is below. I already have a fix for this, I will submit a PR.

Traceback (most recent call last):
  File "./gcp_find.py", line 452, in <module>
    gcps.gcp_output()
  File "./gcp_find.py", line 230, in gcp_output
    for gcp in gcp_list:
TypeError: 'NoneType' object is not iterable