http://mySite/message?token=AP.1d&title=Заголовок&message=message&priority=5
{"error":"Unauthorized","errorCode":401,"errorDescription":"you need to provide a valid access token or user credentials to access this api"}
{"error":"Unauthorized","errorCode":401,"errorDescription":"you need to provide a valid access token or user credentials to access this api"}
{"id":23,"appid":4,"message":"Сообщение","title":"Заголовок","priority":7,"date":"2024-11-29T11:44:17.824985124+03:00"}
<link rel="index" id="indexlink" type="text/html" href="http://192.168.1.3:8000/bugs/" />
<link rel="section" type="text/html" href="http://192.168.1.3:8000/bugs/?project=2" />
<link media="screen" href="http://192.168.1.3:8000/bugs/themes/CleanFS/theme.css" rel="stylesheet" type="text/css" />
<link media="print" href="http://192.168.1.3:8000/bugs/themes/CleanFS/theme_print.css" rel="stylesheet" type="text/css" />
<link href="http://192.168.1.3:8000/bugs/themes/CleanFS/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="Flyspray RSS 1.0 Feed"
href="http://192.168.1.3:8000/bugs/feed.php?feed_type=rss1&project=2" />
<link rel="alternate" type="application/rss+xml" title="Flyspray RSS 2.0 Feed"
href="http://192.168.1.3:8000/bugs/feed.php?feed_type=rss2&project=2" />
<link rel="alternate" type="application/atom+xml" title="Flyspray Atom 0.3 Feed"
href="http://192.168.1.3:8000/bugs/feed.php?feed_type=atom&project=2" />
<script type="text/javascript" src="http://192.168.1.3:8000/bugs/js/prototype/prototype.js"></script>
<script type="text/javascript" src="http://192.168.1.3:8000/bugs/js/script.aculo.us/scriptaculous.js"></script>
<script type="text/javascript" src="http://192.168.1.3:8000/bugs/js/index.js"></script>
<script type="text/javascript" src="http://192.168.1.3:8000/bugs/js/tabs.js"></script>
<script type="text/javascript" src="http://192.168.1.3:8000/bugs/js/functions.js"></script>
<script type="text/javascript" src="http://192.168.1.3:8000/bugs/js/jscalendar/calendar_stripped.js"></script>
<script type="text/javascript" src="http://192.168.1.3:8000/bugs/js/jscalendar/calendar-setup_stripped.js"> </script>
<script type="text/javascript" src="http://192.168.1.3:8000/bugs/js/jscalendar/lang/calendar-ru.js"></script>
<script type="text/javascript" src="http://192.168.1.3:8000/bugs/js/lightbox/js/lightbox.js"></script>
<link rel="stylesheet" href="http://192.168.1.3:8000/bugs/js/lightbox/css/lightbox.css" type="text/css" media="screen" />
location /bugs {
alias /home/pi/flyspray/;
index index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}
...
WorkingDirectory=/home/pi/www
Environment="PYTHONPATH=/home/pi/www/env/lib/python3.12/site-packages"
ExecStart=/home/pi/www/env/bin/python3 /home/pi/www/run.py
...
Добавление PYTHONPATH в конфигурацию systemd гарантировало, что Python всегда видит путь к модулям в виртуальном окружении, даже при запуске через systemd.
Проще говоря, без этого пути Python "не знал", где искать установленные библиотеки, поэтому и возникала ошибка ModuleNotFoundError.
Я вижу ответ по команде CURL и ответ по запросу из браузера. Эти ответы разные.