TeleGPT
TeleGPT copied to clipboard
Stuck at the compiling process when I use the cargo build --release
After the cargo build --release, everything seemed ok until the teloxide-core
root@ubuntu-s-1gb-sgp1-tg:~/TeleGPT# cargo build --release
Compiling teloxide-core v0.6.3
Building [=====================> ] 227/253: teloxide-core
It seems the crate 'teloxide-core v0.6.3' could not be found in registry index.
after re-clone the repo and run the cargo build --release, stuck at the teloxide-core again
Compiling takecell v0.1.1
Compiling teloxide-core v0.9.1
Building [====================> ] 217/250: teloxide-core
@unixzii @Lakr233 Could You guys help me fix this problem~
@elliclee What's your host machine and toolchain environment? Seems like it has nothing to do with the code.
@unixzii I deploy the project on the server of Digitalocean(Ubuntu 22.10 x64)
@unixzii after deploy to another server, I've built the telegpt, after running the telegpt, I got
lighthouse@VM-0-6-ubuntu:~$ ~/TeleGPT/target/release/telegpt
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: unable to open database file: /telegpt/data/telegpt.sqlite
Caused by:
Error code 14: Unable to open the database file', /home/lighthouse/TeleGPT/src/app.rs:53:6
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)
and my telegpt.config.json file is:
{
"openaiAPIKey": "sk-7yxxx",
"botToken": "6xxx4:Axxxs:",
"conversationLimit": 16,
"databasePath": "/telegpt/data/telegpt.sqlite",
"adminUsernames": [
"cyandev",
"withExtendedLifetime"
],
"i18n": {
"resetPrompt": "Your conversation has been reset."
}
}
Hi @elliclee, I guess you were compiling the bot manually, and the config file you used is for Docker. The database path should be writable, for what you specified (/telegpt/data/telegpt.sqlite
), please check if /telegpt/data/
directory exists.