错误:无法连接到X服务器-从终端运行python脚本时

我正在尝试从Raspberry Pi的终端运行程序。

class modelName extends Model
{
  public static $extraArguments;
  public function __construct(array $attributes = [],$data = [])
  {
     parent::__construct($attributes);
     self::$extraArguments = $data  ; 

  public static function boot()
  {
     parent::boot();

     self::created(function ($model) {
         //the model created for the first time and saved
         //do something
        //code here
         self::$extraArguments; // is available in here
     });
   }
}

并收到此错误:

未指定协议:无法连接到X服务器:10 .0

我尝试重新生成sudo python3 /home/pi/Desktop/FaceDetectionNoIRCam/faceDetect.py 文件并添加根.Xauthority,但是没有用。

我正在使用 Windows远程桌面连接访问Pi。

xiaoxia20008 回答:错误:无法连接到X服务器-从终端运行python脚本时

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2672208.html

大家都在问