LJMUAstroecology / flirpy

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

No output generated if output path contains special characters #11

Open LukasBommes opened 4 years ago

LukasBommes commented 4 years ago

Hey jveitchmichaelis,

I found another little bug in the split_seqs script (as in flirpy 0.1.1). I had the character "ä" (used quite often in German) in my output path and the script stopped generating any preview JPEGs or TIFFs, however without throwing any exception.

You can likely reproduce the error by running:

python split_seqs.py --input "*.SEQ" --output "outä"

It is not a big deal as I can just rename my paths. But just to let you know.

Regards, Lukas

jveitchmichaelis commented 4 years ago

Ah unicode fun... Are you running python 3?

A related stackoverflow https://stackoverflow.com/questions/50781888/create-a-folder-with-special-characters-in-python

LukasBommes commented 4 years ago

Yes, I am running 3.6.7 Can you reproduce the error? Maybe, it is not even the fault of flirpy. Because, I get the same behavior with OpenCV's imwrite function (version 3.4.2) on my system. In case you can not reproduce the error you can probably just close this issue.

jveitchmichaelis commented 4 years ago

So this works for me:

import cv2
import numpy as np

test = np.zeros((100,100,3))
cv2.imwrite("käfer.png", test)

I think I have a more recent version of OpenCV (e.g. pip install python-opencv-headless should give you 4.x).