Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programs cannot be launched in "plain" mode since the entrypoint conflicts with binaries #482

Open
hoh opened this issue Nov 22, 2023 · 0 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@hoh
Copy link
Member

hoh commented Nov 22, 2023

Uploading a program in "plain" mode requires an entrypoint that does not contain the name of the module ("app" instead of "main:app"), however the presence of ":" in the entrypoint is used to differenciate between Python programs and executables to launch. When trying to use "app" as an entrypoint to a program in "plain" mode, the init attempts to launch an executable.

vm-4 PermissionError: [Errno 13] Permission denied: '/opt/code/executable app'             
2023-11-22 10:56:25,162 | ERROR | Traceback (most recent call last):                                                                          
  File "/root/init1.py", line 428, in main            
    app: Union[ASGIApplication, subprocess.Popen] = setup_code(                                                                               
  File "/root/init1.py", line 227, in setup_code                                                                                              
    return setup_code_executable(code=code, encoding=encoding, entrypoint=entrypoint)                                                         
  File "/root/init1.py", line 217, in setup_code_executable                                                                                   
    process = subprocess.Popen(path)                                                                                                          
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,                                                                              
  File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child                         
    raise child_exception_type(errno_num, err_msg, err_filename)                                                                              
PermissionError: [Errno 13] Permission denied: '/opt/code/executable app'                                                                     
NoneType: None
@hoh hoh added bug Something isn't working good first issue Good for newcomers labels Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants