Skip to content

Critical failure with jupyter-core 5.8.0 on Windows #1527

Open
@krassowski

Description

@krassowski

Description

Seen on jupyter/notebook#7653

def _get_config_dir(user: bool = False, sys_prefix: bool = False) -> str:
"""Get the location of config files for the current context
Returns the string to the environment
Parameters
----------
user : bool [default: False]
Get the user's .jupyter config directory
sys_prefix : bool [default: False]
Get sys.prefix, i.e. ~/.envs/my-env/etc/jupyter
"""
if user and sys_prefix:
sys_prefix = False
if user:
extdir = jupyter_config_dir()
elif sys_prefix:
extdir = ENV_CONFIG_PATH[0]
else:
extdir = SYSTEM_CONFIG_PATH[0]
return extdir

assumes that SYSTEM_CONFIG_PATH is not empty, however it was allowed to be empty and now by default is empty on Windows starting with 5.8.0 release.

Reproduce

  • Run on Windows with jupyter-core 5.8.0
  • Run jupyter labextension list

Expected behavior

No error

Context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions