RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

No such file or directory: 'assets/temp/mp3/title.mp3'

Open JustinWilker opened this issue 4 years ago • 6 comments

Traceback (most recent call last):
  File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mutagen\_util.py", line 251, in _openfile
    fileobj = open(filename, "rb+" if writable else "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'assets/temp/mp3/title.mp3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Users\justi\Desktop\RedditVideoMakerBot-master\main.py", line 71, in <module>
    main()
  File "D:\Users\justi\Desktop\RedditVideoMakerBot-master\main.py", line 49, in main
    length, number_of_comments = save_text_to_mp3(reddit_object)
  File "D:\Users\justi\Desktop\RedditVideoMakerBot-master\video_creation\voices.py", line 39, in save_text_to_mp3
    length += MP3("assets/temp/mp3/title.mp3").info.length
  File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mutagen\_file.py", line 48, in __init__
    self.load(*args, **kwargs)
  File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mutagen\_util.py", line 154, in wrapper
    with _openfile(self, filething, filename, fileobj,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mutagen\_util.py", line 272, in _openfile
    raise MutagenError(e)
mutagen.MutagenError: [Errno 2] No such file or directory: 'assets/temp/mp3/title.mp3'

JustinWilker avatar Jun 23 '22 18:06 JustinWilker

Just had this problem - how did you go about solving it?

TJ0770 avatar Jun 23 '22 21:06 TJ0770

Delete the .env file and fill out the .env sample

JustinWilker avatar Jun 23 '22 22:06 JustinWilker

THIS WORKED!!! aka all -- after deleting the env file and filling out the sample make sure you rename the .env template file as ".env" then run your main and everything should work!

Jake006thesnake avatar Jun 24 '22 02:06 Jake006thesnake

I deleted the .env after filling the template in and renamed it to .env, I still have this problem please help :(

vgraphic avatar Jun 24 '22 20:06 vgraphic

I deleted the .env after filling the template in and renamed it to .env, I still have this problem please help :(

  • is it the same error? Did you have any other error messages like Sox ?

( I'll do what I can to help I'm new to code)

Jake006thesnake avatar Jun 24 '22 22:06 Jake006thesnake

I deleted the .env after filling the template in and renamed it to .env, I still have this problem please help :(

me too

josh2212 avatar Jun 30 '22 08:06 josh2212