RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

Accidentally messed up the code

Open vxibrahim opened this issue 4 years ago • 6 comments

I was going through the files looking for the background one, but I guess I messed up something while opening and looking at the code of various .py files. Can someone help me fix this? When I enter "python3 main.py" it says this:

Traceback (most recent call last):
  File "/home/pc/Documents/RedditVideoMakerBot/main.py", line 13, in <module>
    from video_creation.voices import save_text_to_mp3
  File "/home/pc/Documents/RedditVideoMakerBot/video_creation/voices.py", line 11, in <module>
    from TTS.swapper import TTS
  File "/home/pc/Documents/RedditVideoMakerBot/TTS/swapper.py", line 6, in <module>
    from TTS.POLLY import POLLY
  File "/home/pc/Documents/RedditVideoMakerBot/TTS/POLLY.py", line 9, in <module>
    from requests.exceptions import JSONDecodeError
ImportError: cannot import name 'JSONDecodeError' from 'requests.exceptions' (/home/pc/.local/lib/python3.10/site-packages/requests/exceptions.py)

EDIT: issue is not from me modifying the code, did a fresh install and got the same error!

vxibrahim avatar Jun 22 '22 16:06 vxibrahim

Just redownload the file. Is there a reason that you can't do that?

andrewfosco avatar Jun 22 '22 17:06 andrewfosco

I don't know what file I messed up. I'm new to all this github stuff. What file do I redownload?

vxibrahim avatar Jun 22 '22 17:06 vxibrahim

I don't know what file I messed up. I'm new to all this github stuff. What file do I redownload?

Redownload everything from GitHub.

aLtRD avatar Jun 22 '22 17:06 aLtRD

I don't know what file I messed up. I'm new to all this github stuff. What file do I redownload?

Redownload everything from GitHub.

Deleted everything and did a fresh install. Got the SAME exact error. So I believe the issue is not from me modifying my code its something else. Please take a second to look at the error in the first post.

This is the main error from what I can see: ImportError: cannot import name 'JSONDecodeError' from 'requests.exceptions'

How do I fix this?

vxibrahim avatar Jun 22 '22 18:06 vxibrahim

Try typing pip3 install -r requirements.text into the terminal INSIDE the repository's folder, and let me know what you get!

prestosole avatar Jun 22 '22 18:06 prestosole

Try typing pip3 install -r requirements.text into the terminal INSIDE the repository's folder, and let me know what you get!

It worked!! Still not sure why the error happened randomly even tho it was working perfectly moments before it. But yes thank you!

vxibrahim avatar Jun 22 '22 20:06 vxibrahim