Closed unkcpz closed 1 year ago
The config is retrieved in aiida.manage.configuration.load_config
, the path of which is determined by aiida.manage.configuration.get_config_path
. That uses the AIIDA_CONFIG_FOLDER
global from aiida.manage.configuration.settings
which should be based on the AIIDA_PATH
variable. Can you open an ipython
shell and run the following:
In [1]: from aiida.manage.configuration import get_config_path
In [2]: get_config_path()
Out[2]: '/home/sph/.aiida/config.json'
In [3]: from aiida.manage.configuration.settings import AIIDA_CONFIG_FOLDER
In [4]: AIIDA_CONFIG_FOLDER
Out[4]: PosixPath('/home/sph/.aiida')
That should be a first check to see whether the env variable is read.
Thanks @sphuber. The catch in my case is the issue happened when I run micromamba activate <env>
. The profile and the python environment are not yet loaded I assume. I tried to add print
in here https://github.com/aiidateam/aiida-core/blob/0bc8ef06b57ee31a5062a225c23f04fc26d00980/aiida/manage/configuration/config.py#L100-L104, but very strange that nothing is printed out.
I'll try if this issue can be reproduced in conda.
Did you find anything more out concerning this issues @unkcpz ?
Sadly, no, it is not an issue for me now, I delete the aiida-core installed by the system python which is an old version, and keep all environments separated in micromamba env the issue didn't show again. I close this and I'll reopen it if encounter again with more details.
Describe the bug
I have a conda (micromamba) environment set with
AIIDA_PATH
set by in the/home/jyu/micromamba/envs/aiida-sssp-dev/etc/conda/activate.d/env_vars.sh
, I have:but when I activate the env by
micromamba activate
the/home/jyu/.aiida/config.json
is forced migrated to the latest version compatible with the aiida-core version in the conda environment.The message I got:
Steps to reproduce
Steps to reproduce the behavior:
env_var.sh
with theAIIDA_PATH
.$HOME/.aiida/config.json
, the config version is the old compatible version, I have 5.Expected behavior
If the specific
AIIDA_PATH
is set, it will be used.Your environment
Other relevant software versions, e.g. Postres & RabbitMQ
Additional context