yoshida-lab/XenonPy

import xenonpy permission error

tonosunn-dn opened this issue · 2 comments

When running in the docker container, I get the following error.

import xenonpy
Traceback (most recent call last):
File "", line 1, in
File "/home/user/.local/lib/python3.7/site-packages/xenonpy/init.py", line 66, in
__init()
File "/home/user/.local/lib/python3.7/site-packages/xenonpy/init.py", line 42, in __init
copyfile(str(Path(file).parent / 'conf.yml'), str(user_cfg_file))
File "/home/user/miniconda/envs/py37/lib/python3.7/shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/home/user/.xenonpy/conf.yml'

I was able to avoid the error with the following command.
sudo chmod 777 -R /home/user/.xenonpy

@TsumiNa have we solved this problem yet?

We can't solve this kind of errors. Docker is running in root mode, but for some security reasons, instead of using the root user, we create a normal user and use it in docker. That is why we get PermissionError when docker tries to read some files on the host.

The Linux community recommends that users migrate from Docker to Podman. However, Podman is a Linux-like system-first project and is not as easy to use as Docker on both Mac and Win. I plan to do some tests and preparations for the migration, but it will take a bit more time.