Skip to content

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

Open
@hoh

Description

@hoh

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions