mlsmithjr/transcoder

AttributeError: 'PosixPath' object has no attribute 'is_mount'

Closed this issue · 3 comments

Was not sure what title to give this, my apologizes if this was not correct. I have tried running pytranscoder against the same bbb_sunflower_1080p_30fps_normal.mp4 to test the transcoder out. I have receieved this same error message on ubuntu 18.04.04 and Windows 10 using linux subsystem. Thank you for any help figuring out how to stop this error and have the transcoder start running. I am excited to get this up and going. Below is the command along with the output run in linux subsystem for windows 10.

pytranscoder --dry-run -p x264 /mnt/c/Users/Admin/Documents/bbb_sunflower_1080p_30fps_normal.mp4 Exception in thread _default_: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/derek/.local/lib/python3.6/site-packages/pytranscoder/transcode.py", line 63, in run self.go() File "/home/derek/.local/lib/python3.6/site-packages/pytranscoder/transcode.py", line 80, in go if is_mounted(job.inpath) and self.config.fls_path(): File "/home/derek/.local/lib/python3.6/site-packages/pytranscoder/utils.py", line 89, in is_mounted if str(part) != str(part.root) and part.is_mount(): AttributeError: 'PosixPath' object has no attribute 'is_mount'

The problem might be that its on a SMB mount, or something with Ubuntu 18.04?
I changed it to:
part.is_dir()
And now it seems to work.

The is_mount() stuff was a good idea but bad implementation and will be pulled out shortly. The idea was to detect if your source is on a networked filesystem and, if so, use a local drive to write your transcoded file. Then, when finished, copy the product to your source location.
The idea was to help prevent drive thrashing with multiple transcodes doing parallel reads and writes.
I think I'll just make it always write to your designated temp space rather than be too clever about it.

Fix queued for next update. Thanks.