Problem description:
This project (https://replit.com/@latinlens/SD-Test) works properly in the console, and with ‘Always On’ at the repl.co, but will not deploy. I have isolated the problem to two lines of code which the Deployment cannot run.
Expected behavior:
When you hit ‘run’ it should serve the main web page route (‘/’) and should call these two lines of code and display their results, just as it does when you run it in the console.
Actual behavior:
Press ‘Deploy’ and the deployment fails.
Steps to reproduce:
Go to this replit https://replit.com/@latinlens/SD-Test, fork it, and deploy. It produces an error - seems to be a file not found error. However, the same lines of code work when you run the Replit from the console.
The code that will not execute in Deployment is on lines 124 and 125 in main.py:
result1 = subprocess.check_output(["bin/meanings", "salve"], text=True, cwd='whitakers-words')
result2 = subprocess.check_output(['./words','~E','man'], text=True, cwd='e2l')
Error message at deployment time:
ERROR:main:Exception on / [GET]
rv = self.handle_user_exception(e)
File "/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/lib/python3.10/subprocess.py", line 971, in __init__
Traceback (most recent call last):
response = self.full_dispatch_request()
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/home/runner/0aa32fd9-7daa-4e6c-8a59-cfe52a0768ab/.pythonlibs/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
File "/home/runner/0aa32fd9-7daa-4e6c-8a59-cfe52a0768ab/.pythonlibs/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
with Popen(*popenargs, **kwargs) as process:
File "/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/lib/python3.10/subprocess.py", line 503, in run
rv = self.dispatch_request()
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'bin/meanings'
File "/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/lib/python3.10/subprocess.py", line 421, in check_output
self._execute_child(args, executable, preexec_fn, close_fds,
error: The deployment failed to initialize due to a configuration or code error. Check the logs tab for more information. For additional support, please post on https://ask.replit.com/c/help/13 and a staff member will take a look. - 2023-11-01T16:07:45.726Z
thanks in advance for any help.
Browser:
Brave
OS:
Mac OS.
Plan (Free, Hacker, Pro Plan):
Hacker