Some problem
bolshukhin opened this issue · 11 comments
bolshukhin_roman@NETTOP-SQUARE:/opt/qbittorrent-bot$ python3 /opt/qbittorrent-bot/main.py
Traceback (most recent call last):
File "/opt/qbittorrent-bot/main.py", line 1, in
from src.bot import app, scheduler
ModuleNotFoundError: No module named 'src'
bolshukhin_roman@NETTOP-SQUARE:/opt/qbittorrent-bot$
× qbittorrent-bot.service - qBittorrent-bot
Loaded: loaded (/etc/systemd/system/qbittorrent-bot.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2023-06-07 18:02:59 MSK; 7s ago
Process: 3658 ExecStart=python3 /opt/qbittorrent-bot/main.py (code=exited, status=1/FAILURE)
Main PID: 3658 (code=exited, status=1/FAILURE)
Jun 07 18:02:59 NETTOP-SQUARE systemd[1]: Started qBittorrent-bot.
Jun 07 18:02:59 NETTOP-SQUARE python3[3658]: Traceback (most recent call last):
Jun 07 18:02:59 NETTOP-SQUARE python3[3658]: File "/opt/qbittorrent-bot/main.py", line 1, in
Jun 07 18:02:59 NETTOP-SQUARE python3[3658]: from src.bot import app, scheduler
Jun 07 18:02:59 NETTOP-SQUARE python3[3658]: ModuleNotFoundError: No module named 'src'
Jun 07 18:02:59 NETTOP-SQUARE systemd[1]: qbittorrent-bot.service: Main process exited, code=exited, status=1/FAILURE
Jun 07 18:02:59 NETTOP-SQUARE systemd[1]: qbittorrent-bot.service: Failed with result 'exit-code'.
What I must to do? Thanks
Hi, you should try running the script from the root folder of the project. In this case /opt/qbittorrent-bot
Hi, you should try running the script from the root folder of the project. In this case /opt/qbittorrent-bot
bolshukhin_roman@NETTOP-SQUARE://$ python3 /opt/qbittorrent-bot/main.py
Traceback (most recent call last):
File "/opt/qbittorrent-bot/main.py", line 1, in
from src.bot import app, scheduler
File "/opt/qbittorrent-bot/src/bot.py", line 11, in
from src import qbittorrent_control
File "/opt/qbittorrent-bot/src/qbittorrent_control.py", line 3, in
from src.config import BOT_CONFIGS
File "/opt/qbittorrent-bot/src/config.py", line 61, in
with open('/app/config/config.json', 'r') as config_json:
FileNotFoundError: [Errno 2] No such file or directory: '/app/config/config.json'
bolshukhin_roman@NETTOP-SQUARE://$ ls /opt/qbittorrent-bot
Dockerfile LICENSE README.md bot.py config.json config.json.template config.py custom_filters.py db_management.py docker-image.yml main.py qbittorrent_control.py requirements.txt src utils.py
That's not the same error. Check the readme, I created a section to make the bot work even without docker.
https://github.com/ch3p4ll3/QBittorrentBot#running-without-docker
That's not the same error. Check the readme, I created a section to make the bot work even without docker.
https://github.com/ch3p4ll3/QBittorrentBot#running-without-docker
ok. thanks.
can you help me with this info (run with Docker)?
qbittorrentapi.exceptions.APIConnectionError: Failed to connect to qBittorrent. This is likely due to using an untrusted certificate (likely self-signed) for HTTPS qBittorrent WebUI. To suppress this error (and skip certificate verification consequently exposing the HTTPS connection to man-in-the-middle attacks), set VERIFY_WEBUI_CERTIFICATE=False when instantiating Client or set environment variable PYTHON_QBITTORRENTAPI_DO_NOT_VERIFY_WEBUI_CERTIFICATE to a non-null value. SSL Error: SSLError(MaxRetryError("HTTPSConnectionPool(host='10.0.1.20', port=8080): Max retries exceeded with url: /api/v2/auth/login (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1007)')))"))
Where I must to set VERIFY_WEBUI_CERTIFICATE=False ?
And what I must to write to this fields?
"users": [
{
"user_id": 123456,
"notify": false
},
{
"user_id": 12345678,
"notify": true
}
Thanks
Just read the trackeback... You need to set the PYTHON_QBITTORRENTAPI_DO_NOT_VERIFY_WEBUI_CERTIFICATE
to a non-null value. You can do this by adding -e PYTHON_QBITTORRENTAPI_DO_NOT_VERIFY_WEBUI_CERTIFICATE=true
on the docker run command.
ex: docker run -d -v /home/user/docker/QBittorrentBot:/app/config:rw --name qbittorrent-bot -e PYTHON_QBITTORRENTAPI_DO_NOT_VERIFY_WEBUI_CERTIFICATE=true ch3p4ll3/qbittorrent-bot:latest
.
Or you can disable HTTPS on qbittorrent WebUI
To remove the authorization error instead, you have to edit the json file by setting your telegram ID.
Just read the trackeback... You need to set the
PYTHON_QBITTORRENTAPI_DO_NOT_VERIFY_WEBUI_CERTIFICATE
to a non-null value. You can do this by adding-e PYTHON_QBITTORRENTAPI_DO_NOT_VERIFY_WEBUI_CERTIFICATE=true
on the docker run command.ex:
docker run -d -v /home/user/docker/QBittorrentBot:/app/config:rw --name qbittorrent-bot -e PYTHON_QBITTORRENTAPI_DO_NOT_VERIFY_WEBUI_CERTIFICATE=true ch3p4ll3/qbittorrent-bot:latest
. Or you can disable HTTPS on qbittorrent WebUITo remove the authorization error instead, you have to edit the json file by setting your telegram ID.
bolshukhin_roman@NETTOP-SQUARE://$ docker run -d -v /home/user/docker/QBittorrentBot:/app/config:rw --name qbittorrent-bot -e PYTHON_QBITTORRENTAPI_DO_NOT_VERIFY_WEBUI_CERTIFICATE=true ch3p4ll3/qbittorrent-bot:latest
6b87e3ca2d1d551ad8621ac68b898d9266031b6408722a642e19e
bolshukhin_roman@NETTOP-SQUARE:/home/user/docker/QBittorrentBot$ ls
Dockerfile LICENSE README.md config.json config.json.template database.sqlite main.py requirements.txt src
bolshukhin_roman@NETTOP-SQUARE://$ mcedit /home/user/docker/QBittorrentBot/config.json
{
"qbittorrent": {
"ip": "10.0.1.20",
"port": 8080,
"user": "admin",
"password": "adminadmin"
},
"telegram": {
"bot_token": "6148000000:AAER9WzWgtLt",
"api_id": 2820000,
"api_hash": "49eaee"
},
"users": [
{
"user_id": 123456,
"notify": false
},
{
"user_id": 12345678,
"notify": true
}
]
}
Or you can disable HTTPS on qbittorrent WebUI
DONE
logs are empty. but
"You are not authorized to use this bot"
Again, edit the "user_id" record on the JSON file with YOUR telegram id.
And you shouldn't post here tour api hash, api id and bot token
And you shouldn't post here tour api hash, api id and bot token
it's works. only in Docker for me.. (
Thanks )
@ch3p4ll3 And one question, please. Where I can edit buttons and success message? I try to /bot.py , but nothing.
All the buttons and messages are in src/bot.py file