Heroku错误:找不到请求的API端点

问题描述

我正在尝试部署到Heroku

但是我在此步骤上遇到了问题:

public void sub() {
    System.out.println("startig...");
    Scanner newLineReader = null;
    try {
        Process process = Runtime.getRuntime().exec("python3 /home/.../PycharmProjects/.../fraudanalysis.py /home/.../PycharmProjects/.../fraudAnalysis.db 500");
        process.waitFor();
        File file = new File("/home/.../PycharmProjects/.../output.txt");
        newLineReader = new Scanner(file);
        String line;
        while((line=newLineReader.nextLine())!=null) {
            System.out.println(line);
        }
        
    } catch(IOException ioe) {
        ioe.printstacktrace();
    }catch(InterruptedException ie) {
        ie.printstacktrace();
    }finally {
        newLineReader.close();
    }
}

public void sub2() {
    ProcessBuilder pb =
       new ProcessBuilder("python3","/home/.../PycharmProjects/.../fraudanalysis.py","/home/.../PycharmProjects/.../fraudAnalysis.db","500");
    
    File log = new File("/home/.../PycharmProjects/.../output.txt");
    pb.redirectErrorStream(true);
    pb.redirectOutput(Redirect.appendTo(log));
    Process p = null;
    try {
        p = pb.start();
    } catch (IOException e) {
        e.printstacktrace();
    }
    try {
        p.waitFor();
    } catch (InterruptedException e) {
        e.printstacktrace();
    }
    
    Scanner newLineReader = null;
    try{
        newLineReader = new Scanner(log);
        String line;
        while((line=newLineReader.nextLine())!=null) {
            System.out.println(line);
        }
    }catch(IOException ioe) {
        ioe.printstacktrace();
    }
}

运行命令时,我得到以下信息:

create heroku-postgresql:hobby-dev --app name_of_your_application

以下是屏幕截图:

Error

我不确定自己在做什么错吗?

我继续前进,并从Heroku仪表板连接了我的github并从那里安装了postgres,但是这样做可能会使问题变得更糟。

Github Link

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)