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

CodeInterpreter in web UI cannot execute: Permission denied: '/app/ces/kernel_logging.log' #289

Open
Mrzhiyao opened this issue Apr 9, 2024 · 6 comments

Comments

@Mrzhiyao
Copy link

Mrzhiyao commented Apr 9, 2024

When answering tasks using the UI interface, the following error occurred in the ’CodeInterpreter'.

Traceback (most recent call last):
File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/app/taskweaver/ces/kernel/launcher.py", line 5, in
from taskweaver.ces.kernel.kernel_logging import logger
File "/app/taskweaver/ces/kernel/kernel_logging.py", line 4, in
logging.basicConfig(
File "/usr/local/lib/python3.10/logging/init.py", line 2031, in basicConfig
h = FileHandler(filename, mode,
File "/usr/local/lib/python3.10/logging/init.py", line 1167, in init
StreamHandler.init(self, self._open())
File "/usr/local/lib/python3.10/logging/init.py", line 1197, in _open
return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: '/app/ces/kernel_logging.log'

By observing the logs, I found that although container 'taskweavercontainers/taskweaver-executor ' is recreated every time it fails, it cannot be executed every time. This error persists in the logs. What is the reason for this.

@liqul
Copy link
Contributor

liqul commented Apr 9, 2024

It seems that the process inside the container has no permission to access the session directory mounted to the container. Can you provide more information on your environment? like what is your host OS? You said it cannot be executed every time. Do you mean that it sometimes can run successfully?

@pai4451
Copy link

pai4451 commented Apr 11, 2024

same here

@liqul
Copy link
Contributor

liqul commented Apr 11, 2024

same here

configurations and the environment?

@pai4451
Copy link

pai4451 commented Apr 11, 2024

same here

configurations and the environment?

Ubuntu 22.04, and I run this ascii example on the documentation (I only adjust the ascii_render.yaml with enabled = true)

Here is how I reproduce it on my machine

cd scripts
./build_executor.sh
python3 -m taskweaver -p ./project/

After the terminal showed the welcome message, I asked for "render ABC in ascii art" to Taskweaver. I got the following error:

File "/home/ai-agent/TaskWeaver/taskweaver/ces/environment.py", line 266, in start_session
    raise Exception("Container is not ready after 10 seconds")
Exception: Container is not ready after 10 seconds

I then inspect the logs of the execution container taskweavercontainers/taskweaver-executor, here is the logs by the command docker logs <container_id>.

File "/usr/local/lib/python3.10/logging/init.py", line 1201, in _open
    return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: '/app/ces/kernel_logging.log'

@liqul
Copy link
Contributor

liqul commented Apr 11, 2024

We have identified a bug of configuring the dir permission for linux OS. Will fix it asap.

@liqul
Copy link
Contributor

liqul commented Apr 11, 2024

Fixed in #296

Please pull the latest code and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants