I recently started writing macros and have been struggling with this one
problem for about a week. I have a directory containing two versions of each
file, one version in TIFF form and the other in CZI form. I want to open all
the CZI files, but the program I wrote opens everything. There's a simple
fix but I'm stumped. Assistance would be greatly appreciated.
The problem is that you are missing the second curly closing bracket. The compiler interprets this as the endswith statement block being empty, placing the open line outside the intended block. So all you need is to place a closing bracket at the end.