capslock / stable-diffusion-bot

Telegram bot for Stable Diffusion, written in Rust.
https://capslock.github.io/stable-diffusion-bot/
MIT License
14 stars 4 forks source link

Caused by: missing field `api_key` config.toml #1

Closed TimmekHW closed 1 year ago

TimmekHW commented 1 year ago

i create

api_key = "62------3:AAFNQuc3TA-----j8--LZTb8D--s" allowed_users = [ list, of, telegram, ids ] db_path = "./db.sqlite" sd_api_url = "http://localhost:7860" image

------ I edited for safety

capslock commented 1 year ago

Ensure that your config.toml is in the same directory that you're running the bot from. In your case, the path should be C:\Users\Timmek\config.toml.

TimmekHW commented 1 year ago

Убедитесь, что вы config.tomlнаходитесь в том же каталоге, из которого вы запускаете бота. В вашем случае путь должен быть C:\Users\Timmek\config.toml.

Convinced. he is there

capslock commented 1 year ago

How did you create the file? Is it listed when you type ls config.toml?

TimmekHW commented 1 year ago

config.toml

capslock commented 1 year ago

I don't have any more ideas; your configuration should work (actually, it should give you an error about allowed_users being invalid, but it doesn't even get that far).

In the future I may expand the CLI arguments to allow for a config file path to be provided, which may help with your issue.

If you want a potential alternative, you can try setting the arguments as env variables in powershell:

$Env:SD_TELEGRAM_API_KEY = "62------3:AAFNQuc3TA-----j8--LZTb8D--s"
$Env:SD_TELEGRAM_SD_API_URL = "http://localhost:7860/"
$Env:SD_TELEGRAM_ALLOWED_USERS = "[ list, of, telegram, ids ]"
$Env:SD_TELEGRAM_DB_PATH = "./db.sqlite"
stable-diffusion-bot
TimmekHW commented 1 year ago

I reinstalled Windows, web ui and it worked for me! thank you, you are the best!