I am to import mne-python using the github actions automatic testing, and get the following error when importing
MNE version: 1.3.0
operating system: Windows 10
using Windows only.
import mne
.tox\py310\lib\site-packages\mne_init_.py:130: in
set_log_level(None, False)
.tox\py310\lib\site-packages\mne\utils_logging.py:204: in set_log_level
verbose = get_config(‘MNE_LOGGING_LEVEL’, ‘INFO’)
.tox\py310\lib\site-packages\mne\utils\config.py:234: in get_config
config_path = get_config_path(home_dir=home_dir)
.tox\py310\lib\site-packages\mne\utils\config.py:184: in get_config_path
val = op.join(_get_extra_data_path(home_dir=home_dir),
.tox\py310\lib\site-packages\mne\utils\config.py:330: in _get_extra_data_path
if op.isdir(op.join(os.getenv(‘APPDATA’), ‘.mne’)):
C:\hostedtoolcache\windows\Python\3.10.9\x64\lib\ntpath.py:104: in join
path = os.fspath(path)
E TypeError: expected str, bytes or os.PathLike object, not NoneType
I do not get this error in Linux or Mac however. Maybe someone encountered something similar?
Looks like a bug to me. Apparently the APPDATA environment variable is not set and we don’t handle this case gracefully. As a workaround, can you try to set the variable to an arbitrary value?
[tox]
env_list =
py3{10, 11}
skip_missing_interpreters = true
isolated_build = true
[testenv]
description = install pytest in a virtual environment and invoke it on the tests folder
deps =
pytest>=7
pytest-sugar
commands = pytest tests {posargs}
[tox]
env_list =
py3{10, 11}
skip_missing_interpreters = true
isolated_build = true
[testenv]
description = install pytest in a virtual environment and invoke it on the tests folder
deps =
pytest>=7
pytest-sugar
commands = pytest tests {posargs}
I know its a super specific error, I checked on the github website Workflow syntax for GitHub Actions - GitHub Docs that their os is Windows Server 2022. So one option might be simple to not use the workflow on Windows, since MacOS and Linux are passing fine.