LJMUAstroecology / flirpy

Python library to interact with FLIR camera cores
Other
191 stars 54 forks source link

path to exiftool #98

Open aalonsop opened 2 months ago

aalonsop commented 2 months ago

Hello

Great work on this tool, many thanks!

I'm using MacOS M2 Max (Sonoma 14.5 (23F79)) and I installed fliroy via pip within a conda environment. I previously installed Exiftool as indicated here and the installation worked fine as I could execute the tool from the terminal. I also modified my PATH (export PATH=$PATH:/usr/local/bin). However, when I tried to use the _spliseq script provided I would get the following warning :

WARNING:flirpy.util.exiftool:Exiftool not installed, try: apt install exiftool

and the following error :

AttributeError: 'Exiftool' object has no attribute 'path'

Something that worked for me is to correct the path in the lines 20-21 of the file : /flirpy/util/exiftool.py

The correction in my case is :

elif platform.uname()[4].startswith("arm"):
                if os.path.isfile("/usr/local/bin/exiftool"):
                    self.path = "/usr/local/bin/exiftool"
jveitchmichaelis commented 2 months ago

Thanks. We probably want to check if Exiftool is on the path using which or something similar, rather than hardcode it.

On Tue, 9 Jul 2024 at 12:36, aalonsop @.***> wrote:

Hello

Great work on this tool, many thanks!

I'm using MacOS M2 Max (Sonoma 14.5 (23F79)) and I installed fliroy via pip within a conda environment. I previously installed Exiftool as indicated here https://exiftool.org/install.html and the installation worked fine as I could execute the tool from the terminal. I also modified my PATH (export PATH=$PATH:/usr/local/bin). However, when I tried to use the spli_seq script provided I would get the following warning :

WARNING:flirpy.util.exiftool:Exiftool not installed, try: apt install exiftool

and the following error :

AttributeError: 'Exiftool' object has no attribute 'path'

Something that worked for me is to correct the path in the lines 20-21 of the file : /flirpy/util/exiftool.py

The correction in my case is :

elif platform.uname()[4].startswith("arm"): if os.path.isfile("/usr/local/bin/exiftool"): self.path = "/usr/local/bin/exiftool"

— Reply to this email directly, view it on GitHub https://github.com/LJMUAstroecology/flirpy/issues/98, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYDMJ3FK53O5FCFDIFPA2TZLMV7LAVCNFSM6AAAAABKRZYWMOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4TMOBUGAZDANQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>