MicaSense Image Processing Setup
In the MicaSense Image Processing Setup, I got after running
- first cell:
Successfully imported all required libraries. Successfully executed exiftool.
- second cell:
FileNotFoundError Traceback (most recent call last) Cell In[2], line 7 3 imageName = glob.glob(os.path.join(imagePath,'IMG_0001_1.tif'))[0] 5 exiftool_path = None ----> 7 img = Image(imageName) 8 img.plot_raw(figsize=(8.73,8.73)); 10 from micasense.panel import Panel
File ~\imageprocessing\micasense\image.py:72, in Image.init(self, image_path, exiftool_obj, allow_uncalibrated) 70 raise IOError("Provided path is not a file: {}".format(image_path)) 71 self.path = image_path ---> 72 self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) 74 if self.meta.band_name() is None: 75 raise ValueError("Provided file path does not have a band name: {}".format(image_path))
File ~\imageprocessing\micasense\metadata.py:51, in Metadata.init(self, filename, exiftool_path, exiftool_obj) 49 if not os.path.isfile(filename): 50 raise IOError("Input path is not a file") ---> 51 with exiftool.ExifToolHelper() as exift: 52 self.exif = exift.get_metadata(filename)
File ~\anaconda3\envs\micasense\lib\site-packages\exiftool\helper.py:100, in ExifToolHelper.init(self, auto_start, check_execute, check_tag_names, **kwargs)
92 """
93 :param bool auto_start: Will automatically start the exiftool process on first command run, defaults to True
94 :param bool check_execute: Will check the exit status (return code) of all commands. This catches some invalid commands passed to exiftool subprocess, defaults to True. See :py:attr:check_execute for more info.
(...)
97 :param kwargs: All other parameters are passed directly to the super-class constructor: :py:meth:exiftool.ExifTool.__init__()
98 """
99 # call parent's constructor
--> 100 super().init(**kwargs)
102 self._auto_start: bool = auto_start
103 self._check_execute: bool = check_execute
File ~\anaconda3\envs\micasense\lib\site-packages\exiftool\exiftool.py:292, in ExifTool.init(self, executable, common_args, win_shell, config_file, encoding, logger) 288 self.logger = logger 290 # use the passed in parameter, or the default if not set 291 # error checking is done in the property.setter --> 292 self.executable = executable or constants.DEFAULT_EXECUTABLE 293 self.encoding = encoding 294 self.common_args = common_args
File ~\anaconda3\envs\micasense\lib\site-packages\exiftool\exiftool.py:366, in ExifTool.executable(self, new_executable) 363 abs_path = shutil.which(new_executable) 365 if abs_path is None: --> 366 raise FileNotFoundError(f'"{new_executable}" is not found, on path or as absolute path') 368 # absolute path is returned 369 self._executable = str(abs_path)
FileNotFoundError: "exiftool.exe" is not found, on path or as absolute path
In a previous version of the repository, I didn't have this problem but still didn't make it till the end of Tutorial 1 because I got an error in the Undistorting images section. I realized the code version of the tutorials is different than the one I cloned. Can it be, that changes of the lastest version created some bugs?
I had the same issue today, I installed the whole things about one and a half years ago and it ran fine, now on a new PC, the same Error as as @job012. I solved the Problem by incrementally copying the the parts of the working enviroment to the to the not working one. The "solution" was to use an older Exiftoolversion, in my case 12.82, that got it up and running. This is not really a futureproof resolution, but it should get you started. I assume, that there are some teething problems with pyexiftool and the newer versions of exiftool.
@funny-name2 I used the Exiftoolversion 12.82, but it didnt solve the problem. Dont you think you solved the problem also by incrementally copying the the parts of the working enviroment to the to the not working one? @poynting @loicdtx @rrowlands Could you please tell how to solve this issue?
@funny-name2 @rrowlands @loicdtx @rrowlands. I SOLVED the problem by just replacing in File ~\anaconda3\envs\micasense\lib\site-packages\exiftool\exiftool.py Line 363 abs_path = shutil.which(new_executable)
with
363 abs_path = os.environ.get('exiftoolpath')
NOW IT WORKS LIKE A CHARM
Thank you this solution worked for me!