Kemono2 icon indicating copy to clipboard operation
Kemono2 copied to clipboard

How should I fill in the SECRET_KEY=

Open yijueEX opened this issue 3 years ago • 4 comments

I get an error message when I try to run server.py: Traceback (most recent call last): File "C:\Users\邦邦\kemono2\server.py", line 68, in app.config.from_pyfile('flask.cfg') File "C:\Users\邦邦\kemono2\flask\config.py", line 119, in from_pyfile exec(compile(config_file.read(), filename, "exec"), d.dict) File "C:\Users\邦邦\kemono2\flask.cfg", line 5 SECRET_KEY= ^ SyntaxError: invalid syntax

I filled in some random numbers, but it came up with the following prompt: Failed to connect to the database: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

I'm pretty sure there are no programs running on port 5432. what should I do

yijueEX avatar Jun 05 '22 13:06 yijueEX

Or what do I do after I complete the readMe steps

yijueEX avatar Jun 05 '22 14:06 yijueEX

SECRET_KEY has to be a string and therefore surrounded by " marks.

BassOfBass avatar Jun 05 '22 14:06 BassOfBass

I have added ''. But I also received the second question above:

Failed to connect to the database: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

Self test according to the above solution. I can connect to 127.0.0.1, localhost and localhost:80. There is no problem with my localhost, so I checked the port connection (Port 5432). No problem. How can I solve the problem? At the same time, what is this python package or the python program?

yijueEX avatar Jun 06 '22 12:06 yijueEX

That's a database, you have to have it set up for running the stack. Or just run the docker setup, it has db pre-configured.

BassOfBass avatar Jun 06 '22 13:06 BassOfBass