누군가가 농담 트로피 식별자 스크립트 ('트랩 음악'처럼)를 써서 제대로 작동하지 않습니다.파이썬이 내 파일을 찾을 수없는 이유는 무엇입니까?
usage: trapifier.py [-h] [--samples [SAMPLES]] inputfile outputfile
그러나, 폴더에도 불구하고이 명령은 항상 [errno를 2] 해당 파일이나 디렉토리
./trapifier.py Chicago.mp3 Chiraq.mp3
또는
python trapifier.py Chicago.mp3 Chiraq.mp3
결과이
ls -l
total 14288
-rwxrwxrwx 1 ________ ________ 7295612 Mar 2 2008 Chicago.mp3
[email protected] 1 ________ ________ 1074 Apr 12 17:00 LICENSE
[email protected] 1 ________ ________ 2871 Apr 12 17:00 README.md
[email protected] 1 ________ ________ 6 Apr 12 17:00 requirements.txt
[email protected] 48 ________ ________ 1632 Apr 12 17:00 samples
-rwxr-xr-x 1 ________ ________ 2923 Apr 12 17:00 trapifier.py
처럼 보이는
또는 심지어
./trapifier.py /full/path/to/Chicago.mp3 Chiraq.mp3
무엇을 제공합니까? 어딘가에 신참 실수가있는 것처럼 느껴집니다. 요청에 의해
전체 오류 메시지 : 스크립트의
Traceback (most recent call last):
File "./trapifier.py", line 89, in <module>
overlay(parse())
File "./trapifier.py", line 32, in parse
base_track = pydub.AudioSegment.from_mp3(inputfile)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pydub/audio_segment.py", line 297, in from_mp3
return cls.from_file(file, 'mp3')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pydub/audio_segment.py", line 284, in from_file
subprocess.call(convertion_command, stderr=open(os.devnull))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
소스는 https://github.com/japesinator/trapifier.py
에서 호스팅 내가 필요한 모든 라이브러리 (argparse, pydub, 운영 체제, 임의)이있다.
최초의 유용한 편집 : pydub.AudioSegment가로드에 실패한 것이 원인입니다. 그러나 사물은 낯선 사람이됩니다. 파이썬 터미널에서 나는
from pydub import AudioSegment
을 수행 할 수 있습니다하지만 난 않는 그런 모듈 오류가 발생하지
수입 pydub.AudioSegment
mp3 파일의 전체 경로를 명시 적으로 시도 했습니까? 'C : \ User \ Music \ Chicago.mp3'와 비슷합니다. – CoryKramer
실제 오류 메시지는 무엇입니까? 아마도이 특정 스크립트에 대한 경험이있는 사람이 아무도 없을 것입니다. 실제로 파일을로드하려고 시도하는 코드를 파헤칠 수 있습니까? – SpoonMeiser
'python trapifier.py ./Chicago.mp3./Chiraq.mp3'와 함께 발생하는 일 – jmunsch