HA6Bots / Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader

A series of 3 programs that will automatically receive scripts from Reddit, allow the user to edit them, then be sent off to a video generator where they will be uploaded to YouTube automatically.
MIT License
616 stars 182 forks source link

Connection problem #67

Open alphanumericaltycoon opened 3 years ago

alphanumericaltycoon commented 3 years ago

OS: Kali Linux

Hi,

I am getting the below error. Any advice on how I can fix it? Thanks

`┌──(kali㉿kali)-[~/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader/YouTube Bot Server] └─$ python3 initserver.py 1 ⨯ Found config.ini Traceback (most recent call last): File "/home/kali/.local/lib/python3.9/site-packages/mysql/connector/network.py", line 509, in open_connection self.sock.connect(sockaddr) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/kali/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader/YouTube Bot Server/initserver.py", line 65, in init() File "/home/kali/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader/YouTube Bot Server/initserver.py", line 46, in init socketserverhandler.startServer() File "/home/kali/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader/YouTube Bot Server/socketserverhandler.py", line 17, in startServer database.beginDataBaseConnection() File "/home/kali/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader/YouTube Bot Server/database.py", line 290, in beginDataBaseConnection connection_pool = pooling.MySQLConnectionPool( File "/home/kali/.local/lib/python3.9/site-packages/mysql/connector/pooling.py", line 159, in init self.add_connection() File "/home/kali/.local/lib/python3.9/site-packages/mysql/connector/pooling.py", line 270, in add_connection cnx = MySQLConnection(self._cnx_config) File "/home/kali/.local/lib/python3.9/site-packages/mysql/connector/connection.py", line 95, in init self.connect(kwargs) File "/home/kali/.local/lib/python3.9/site-packages/mysql/connector/abstracts.py", line 716, in connect self._open_connection() File "/home/kali/.local/lib/python3.9/site-packages/mysql/connector/connection.py", line 206, in _open_connection self._socket.open_connection() File "/home/kali/.local/lib/python3.9/site-packages/mysql/connector/network.py", line 511, in open_connection raise errors.InterfaceError( mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (111 Connection refused) Safe Exit

iatenine commented 3 years ago

Did you provide the MySql login credentials to the appropriate fields within settings.py (database_host, database_user, database_password)?

LavaB0Y commented 3 years ago

iatenine, how do I do that? because when I try to run it, it just returns nothing back and starts from a new line.

stratty7 commented 3 years ago

If you have setup MySQL correctly then in settings.py you need to set

database_host = "" database_user = "" database_password = "" to the login details to MySQL. Default should be:

database_host = "localhost" database_user = "root" database_password = " "

But depending how you have setup it may be different.

LavaB0Y commented 3 years ago

startty, Yeah that's the thing I have no idea how to set that in settings.py as I wrote above it just return nothing back, is there a specific way to start it?

stratty7 commented 3 years ago

Edit settings.py and make those changes I commented above. Then go and run initserver.py.

LavaB0Y commented 3 years ago

I tried some stuff and now it seems to kinda work, thanks, but now when I run init.py a Login page pops up and no matter what I type in, be it the root and password or my reddit name and reddit password it sends back "Socket Broken!" in cmd , what do I do?

iatenine commented 3 years ago

You need to delete config.ini every time you change settings.py. Otherwise the code block to create it doesn't execute and you'll be stuck with the original settings the first time you ran initserver.py

LavaB0Y commented 3 years ago

iatenine, I tried it and it still doesn't work. Where do I have to input this username and password? because I did that already, many times even changing my reddit password and it still doesn't work.