-
Notifications
You must be signed in to change notification settings - Fork 21
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
ExifToolHelper Hangs in pytest, in wine #63
Comments
Ok. I also have an issue with running in pytest on actual Windows. I think this might be related to the bug I reported to CPython more than a year ago. It's still open... python/cpython#87950 You can try putting print statements in |
Let's see if I understand the code in
try:
self._process.communicate(input=b"-stay_open\nFalse\n", timeout=timeout) # this is a constant sequence specified by PH's exiftool
except subprocess.TimeoutExpired: # this is new in Python 3.3 (for python 2.x, use the PyPI subprocess32 module)
pass
# Kill it in all cases
self._process.kill()
In my tests, with the above simple patch, I see no lurking processes in Linux nor Windows. |
Also don't get outs nor errs from Popen.communicate() Fixes sylikc#63
I'll try this next week. But from what I remember, there bug manifests itself during del or something. I had some tests cases that caused PyExifTool to hang. I think they're still in the test code. |
Trying to debug a pyexiftool issue on Windows, to which I don't have access, I'm basically trying to run this, in tobix/pywine:
I run this in the following command:
xvfb-run sh -c "wine pytest"
With various
print
s andpytest
options, I can see that theget_metadata
call works, and thatassert len(d) > 0
passes, but the code never goes past the end of thewith
block. In other words, it hangs in.terminate()
, and never goes to test ExifTool.Now. If I add a
import pdb; pdb.set_trace()
as first line in the function, and hitc
when prompted, it works. What am I doing wrong?The text was updated successfully, but these errors were encountered: