Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck at the compiling process when I use the cargo build --release #15

Open
elliclee opened this issue Mar 23, 2023 · 6 comments
Open
Labels
question Further information is requested

Comments

@elliclee
Copy link

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.

@elliclee
Copy link
Author

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  

@elliclee
Copy link
Author

@unixzii @Lakr233 Could You guys help me fix this problem~

@unixzii
Copy link
Member

unixzii commented Mar 23, 2023

@elliclee What's your host machine and toolchain environment? Seems like it has nothing to do with the code.

@unixzii unixzii added the question Further information is requested label Mar 23, 2023
@elliclee
Copy link
Author

@unixzii I deploy the project on the server of Digitalocean(Ubuntu 22.10 x64)

@elliclee
Copy link
Author

@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."
}
}

@unixzii
Copy link
Member

unixzii commented Mar 23, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants