the.bold.type.s02e02.720p.web.x264-tbs.mkv to /mnt/Resources/TV/The xxx xxx/Season.02/The.xxx.xxx.S02E02.xxx yyy zzz.720p WEB-DL.mkv
2018-06-13 03:38:44 ERROR Thread_16 :: [c65ca26] OSError:
Traceback (most recent call last):
File "/app/medusa/medusa/helpers/__init__.py", line 286, in copy_file
shutil.copyfile(src_file, dest_file)
File "/app/medusa/lib/shutil_custom/__init__.py", line 44, in copyfile_custom
os.write(fout, x)
OSError: [Errno 9] Bad file descriptor
2018-06-13 03:38:44 DEBUG Thread_16 :: [c65ca26] Setting permissions for /mnt/Resources/TV/The xxx xxx/Season.02/The.xxx.xxx.S02E02.xxx yyy zzz.720p WEB-DL.mkv to 438 as parent directory has 511
Seems to happen about once per day. Destination is fine (NFS mount to NAS) and file seems to copy just fine regardless.
OSX is up to date and running Dockerized.
Oddly it's just really once a day despite maybe 5-10 new downloads a day. I can't see anything else obviously triggering (filenames are sane, no special chars, etc)
@medariox a race condition could cause this, as could a file being opened in the wrong mode (e.g. opened 'wb' instead of 'r'). This is happening in shutil_custom. The code I posted previously with changes to shutil_custom that used context managers for properly opening/closing files would likely fix this.
@labrys Do you want to PR it or should I do it?
Feel free to PR it. I'll review it if you would like.
@bobbysteel I assume you have already checked your permissions? Also are you sure it only happens once a day? Don't rely on the error count in the UI for the number of times it happens - many errors are only counted once until reset.
Yep permissions fine and file copies fine. Grepping logs shows only one
line like this in each day or two
On Sat, Jun 16, 2018 at 12:13 AM Labrys of Knossos notifications@github.com
wrote:
@bobbysteel https://github.com/bobbysteel I assume you have already
checked your permissions? Also are you sure it only happens once a day?
Don't rely on the error count in the UI for the number of times it happens
- many errors are only counted once until reset.
—
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/pymedusa/Medusa/issues/4362#issuecomment-397764459,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AASBwRWYTc3OY7x0PpXhrT7KXFGKZ_kuks5t9D-wgaJpZM4Ulr7a
.>
[email protected]
Mobile: +44 778 6066411
When outside the UK: +1 415 935 3441
Possibly fixed with: https://github.com/pymedusa/Medusa/pull/4388 Please let us know.