Skip to content
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

mutagen.MutagenError: [Errno 2] No such file or directory #12

Closed
aledv opened this issue May 16, 2019 · 4 comments
Closed

mutagen.MutagenError: [Errno 2] No such file or directory #12

aledv opened this issue May 16, 2019 · 4 comments

Comments

@aledv
Copy link

aledv commented May 16, 2019

I have this issue with my raspberry, on board python 3.6.5.

Someone else have the same issue?!

pi@raspberrypi:/opt/smd $ sudo python3 main.py -s spotify:track:4tmwiN9YU7xMjh2hoqcVuI
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/mutagen/_util.py", line 235, in _openfile
fileobj = open(filename, "rb+" if writable else "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'cache/4tmwiN9YU7xMjh2hoqcVuI/4tmwiN9YU7xMjh2hoqcVuI.mp3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 456, in
CLI.main(sys.argv[1:])
File "main.py", line 319, in main
state = md.downloadBySpotifyUri(argument)
File "main.py", line 81, in downloadBySpotifyUri
data=info
File "/opt/smd/editor.py", line 65, in setTags
ID3=ID3
File "/usr/local/lib/python3.6/site-packages/mutagen/_file.py", line 49, in init
self.load(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/mutagen/_util.py", line 139, in wrapper
writable, create) as h:
File "/usr/local/lib/python3.6/contextlib.py", line 81, in enter
return next(self.gen)
File "/usr/local/lib/python3.6/site-packages/mutagen/_util.py", line 256, in _openfile
raise MutagenError(e)
mutagen.MutagenError: [Errno 2] No such file or directory: 'cache/4tmwiN9YU7xMjh2hoqcVuI/4tmwiN9YU7xMjh2hoqcVuI.mp3'
pi@raspberrypi:/opt/smd $

@artyshko
Copy link
Owner

New version is available, It might help.
https://github.com/artyshko/smd/releases/tag/v1.5.5

@aledv
Copy link
Author

aledv commented May 17, 2019

thanks for your release.
on my pc work fine, but on rpi I have a new issue.
I attach the log:

pi@raspberrypi:~/Downloads/smd-1.5.5 $ sudo python3 main.py -s spotify:track:4tmwiN9YU7xMjh2hoqcVuI pygame 1.9.4 Hello from the pygame community. https://www.pygame.org/contribute.html 2019-05-17 15:42:20,986 - INFO - Finding 2019-05-17 15:42:23,312 - INFO - Finding [youtube] S3fTw_D3l10: Downloading webpage [youtube] S3fTw_D3l10: Downloading video info webpage [youtube] S3fTw_D3l10: Downloading js player vflOR94oD 2019-05-17 15:42:36,178 - WARNING - https://www.youtube.com/watch?v=S3fTw_D3l10 306000 [youtube] 5f5PWBEMfA4: Downloading webpage [youtube] 5f5PWBEMfA4: Downloading video info webpage [youtube] 5f5PWBEMfA4: Downloading js player vflOR94oD 2019-05-17 15:42:39,597 - WARNING - https://www.youtube.com/watch?v=5f5PWBEMfA4 315000 [youtube] S3fTw_D3l10: Downloading webpage [youtube] S3fTw_D3l10: Downloading video info webpage 2019-05-17 15:42:41,271 - WARNING - https://www.youtube.com/watch?v=S3fTw_D3l10 306000 [youtube] Mx2dROUwHak: Downloading webpage [youtube] Mx2dROUwHak: Downloading video info webpage 2019-05-17 15:42:42,766 - WARNING - https://www.youtube.com/watch?v=Mx2dROUwHak 302000 2019-05-17 15:42:42,767 - INFO - Start downloading 2019-05-17 15:42:42,768 - INFO - Init YouTube 2019-05-17 15:42:42,769 - WARNING - URL https://www.youtube.com/watch?v=S3fTw_D3l10 2019-05-17 15:42:42,770 - INFO - Create Directory 2019-05-17 15:42:42,772 - ERROR - Youtube:os.makedirs('cache/'+path) 2019-05-17 15:42:42,773 - INFO - Start downloading 4tmwiN9YU7xMjh2hoqcVuI [youtube] S3fTw_D3l10: Downloading webpage [youtube] S3fTw_D3l10: Downloading video info webpage [download] /home/pi/Downloads/smd-1.5.5/cache/4tmwiN9YU7xMjh2hoqcVuI/4tmwiN9YU7xMjh2hoqcVuI has already been downloaded [download] 100% of 22.42MiB 2019-05-17 15:42:45,270 - INFO - Downloading successful 2019-05-17 15:42:45,272 - INFO - Start converting Traceback (most recent call last): File "main.py", line 456, in <module> CLI.main(sys.argv[1:]) File "main.py", line 319, in main state = md.downloadBySpotifyUri(argument) File "main.py", line 78, in downloadBySpotifyUri if self.__downloadMusicFromYoutube(fixed_name, info['uri'], info['duration_ms']): File "main.py", line 36, in __downloadMusicFromYoutube uri=uri File "/home/pi/Downloads/smd-1.5.5/youtube.py", line 162, in convertVideoToMusic clip = mp.VideoFileClip(f'cache/{uri}/{uri}.mp4').subclip() File "/usr/local/lib/python3.6/site-packages/moviepy/video/io/VideoFileClip.py", line 91, in __init__ fps_source=fps_source) File "/usr/local/lib/python3.6/site-packages/moviepy/video/io/ffmpeg_reader.py", line 33, in __init__ fps_source) File "/usr/local/lib/python3.6/site-packages/moviepy/video/io/ffmpeg_reader.py", line 256, in ffmpeg_parse_infos proc = sp.Popen(cmd, **popen_params) File "/usr/local/lib/python3.6/subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "/usr/local/lib/python3.6/subprocess.py", line 1344, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: '/root/.imageio/ffmpeg/ffmpeg-linux32-v3.3.1'

@artyshko
Copy link
Owner

It's a big problem, but I think I've got a solution #7 (comment).
By the way, I've never had this problem, so I hope It will help.

@aledv
Copy link
Author

aledv commented May 20, 2019

Hi artyshko, I found a solution.

In my environment was not set FFMPEG_BINARY.

Was usefull this guide: https://zulko.github.io/moviepy/install.html

I hope it will help someone with the same issue.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants