-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NotADirectoryError: [WinError 267] The directory name is invalid #64
Comments
Can you try with an absolute output path? And make sure the folder exists first? What version of flirpy are you using? |
How to know my current version? I installed the lib a week ago by "pip install flirpy". I think it's the latest version. |
I meant for the output folder, e.g. "C:\XXXXX\out" and check that out exists. Yeah if it's from pip it's probably OK. I believe that error means something is being passed a filename instead of a directory. Could you maybe edit the file (C:\XXXXX\venv\lib\site-packages\flirpy\util\exiftool.py) and put a print statement where you get the error (line 75) to see what |
The out is generated with subfolder having same name as my SEQ file, but it's empty in the subfolder |
And can you try running that command manually? i.e. you should have a folder full of fff files and this command should extract the metadata from them. Ah so if I understand correctly, your raw folder is empty at this stage? |
"can you try running that command manually" =>I'm not sure what you mean here |
Underneath, all flirpy is doing is running a chain of Exiftool commands on your data. Actually the version you have may be using flirpy's SEQ decoder which is possibly failing, though I don't think that's the problem here. You'd be getting an error later on if that were the case. It seems like right now it's failing to split a single file. What I was suggesting was to manually run the command that subprocess is trying, e.g.
So, first we take each SEQ file and we split into FFF files - this step seems to have failed, not sure why. Then flirpy will use Exiftool to extract metadata from each of the fff files (i.e. fff -> txt) and this is used for radiometry. Finally, firpy will open each fff file in turn, extract the raw data and use the radiometry to save it as a png/tiff. So this sounds like it may be some issue loading sample.seq. Are you sure the height is 480? Some FLIR cameras have height equal to 512. Let's try and figure out why your SEQ file isn't loading properly first. I'll write some sample code for you to try loading the file manually, but I can't do that right now. |
Yes, it's 640*480 Is it possible that my company computer blocked any new write and then leading to NotADirectoryError: [WinError 267] The directory name is invalid ? |
It's possible, but permission errors can be fairly common with Python on Windows. Have you tried running powershell/prompt administrator? |
Yes, I used prompt administrator. |
If you're unable to modify the directory yourself (i.e. not using Python) then I'm not sure I can help until you figure out why that's happening, it doesn't seem to be an issue with flirpy specifically. |
Hi,
I still have below error due to NotADirectoryError: [WinError 267]
May I know how to solve the problems? You can read the log I posted.
PS C:\XXXXX\venv> python .\scripts\split_seqs.py --input "*.SEQ" --output "out" --width 640 --height 480
INFO:main:Loading: test.seq
INFO:main:Loading: sample.seq
INFO:flirpy.io.seq:Splitting 2 files
0%| | 0/2 [00:00<?, ?it/s]I
NFO:flirpy.io.seq:Splitting test.seq into C:\XXXXX\venv\out\test
0it [00:00, ?it/s]
INFO:flirpy.io.seq:Extracting metadata
0%| | 0/2 [00:00<?, ?it/s]
Traceback (most recent call last):
File "C:\XXXXX\venv\scripts\split_seqs.py", line 112, in
folders = splitter.process(files)
File "C:\XXXXX\venv\lib\site-packages\flirpy\io\seq.py", line 163, in process
self.exiftool.write_meta(filemask)
File "C:\XXXXX\venv\lib\site-packages\flirpy\util\exiftool.py", line 75, in write_meta
res = subprocess.call(cmd, cwd=cwd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 349, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
NotADirectoryError: [WinError 267] The directory name is invalid
The text was updated successfully, but these errors were encountered: