mlsmithjr / transcoder

Python wrapper for ffmpeg for batch and/or concurrent transcoding
GNU General Public License v3.0
117 stars 27 forks source link

is_mount() function requires Python 3.7+ #12

Closed chris91219 closed 4 years ago

chris91219 commented 4 years ago

Great project guys. When trying to play with the tool I've found an update for the doc - dependencies: Python 3 (3.6 or higher).

So I was installing it on Ubuntu 18.04 and its default python3 ( python 3.6.9 ), running the script will get this error report:

convertor2@convertor2:~/autotrans$ ~/.local/bin/pytranscoder --dry-run test.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/convertor2/.local/lib/python3.6/site-packages/pytranscoder/transcode.py", line 63, in run self.go() File "/home/convertor2/.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/convertor2/.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'

Note that is_mount() from pathlib is available from python 3.7 (https://docs.python.org/3/library/pathlib.html#pathlib.Path.is_mount)

And update to python3.7+ fixed the issue.

mlsmithjr commented 4 years ago

Thanks for the clarification. README updated.

On Wed, Apr 22, 2020 at 3:11 AM chris91219 notifications@github.com wrote:

Great project guys. When trying to play with the tool I've found an update for the doc - dependencies: Python 3 (3.6 or higher).

So I was installing it on Ubuntu 18.04 and its default python3 ( python 3.6.9 ), running the script will get this error report:

convertor2@convertor2:~/autotrans$ ~/.local/bin/pytranscoder --dry-run test.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/convertor2/.local/lib/python3.6/site-packages/pytranscoder/transcode.py", line 63, in run self.go() File "/home/convertor2/.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/convertor2/.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'

Note that is_mount() from pathlib is available from python 3.7 ( https://docs.python.org/3/library/pathlib.html#pathlib.Path.is_mount)

And update to python3.7+ fixed the issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mlsmithjr/transcoder/issues/12, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHRMTE6S55QC22ZFQKLZLLRN2KD5ANCNFSM4MN44L2A .