问题:
我在 heroku 上运行了一个 python webapp,它创建了一个与Stockfish国际象棋引擎通信的子进程。
我的本地计算机上的所有JustWorks™,但是在尝试在 Heroku 上部署项目时,我收到一条错误消息PermissionError: [Errno 13] Permission denied
下面,我包含了我尝试部署它时的 heroku 日志。
我知道其他人有 heroku 应用程序在同一个测功机中运行 stockfish 引擎,但是我没有太多运气找到资源来帮助我让它工作。任何帮助表示赞赏。谢谢!
日志:
bash
2017-06-20T22:32:48.419694+00:00 heroku[web.1]: Starting process with command `python server.py`
2017-06-20T22:32:51.933668+00:00 app[web.1]: Traceback (most recent call last):
2017-06-20T22:32:51.933687+00:00 app[web.1]: File "server.py", line 23, in <module>
2017-06-20T22:32:51.933882+00:00 app[web.1]: engine = chess.uci.popen_engine(DIR_PATH + "/stockfish_8_x64")
2017-06-20T22:32:51.933884+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chess/uci.py", line 1405, in popen_engine
2017-06-20T22:32:51.934623+00:00 app[web.1]: PopenProcess(engine, command, **kwargs)
2017-06-20T22:32:51.934625+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chess/uci.py", line 404, in __init__
2017-06-20T22:32:51.934874+00:00 app[web.1]: self.process = subprocess.Popen(command, **popen_args)
2017-06-20T22:32:51.934877+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/subprocess.py", line 707, in __init__
2017-06-20T22:32:51.935286+00:00 app[web.1]: restore_signals, start_new_session)
2017-06-20T22:32:51.935288+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/subprocess.py", line 1326, in _execute_child
2017-06-20T22:32:51.935988+00:00 app[web.1]: raise child_exception_type(errno_num, err_msg)
2017-06-20T22:32:51.936008+00:00 app[web.1]: PermissionError: [Errno 13] Permission denied
2017-06-20T22:32:52.051035+00:00 heroku[web.1]: State changed from starting to crashed
2017-06-20T22:32:52.035235+00:00 heroku[web.1]: Process exited with status 1