anaconda / nb_conda_kernels

Package for managing conda environment-based kernels inside of Jupyter
BSD 3-Clause "New" or "Revised" License
601 stars 70 forks source link

New test failure for non-ASCII directory names #186

Closed mcg1969 closed 8 months ago

mcg1969 commented 4 years ago

https://github.com/Anaconda-Platform/nb_conda_kernels/pull/184/files/2ab07d8ea234fc6944c63f12aa367a1ab16cb2c1#diff-a9435e2ee4230a2889eb27c3cdef1454

The initial error is:

>       names = os.listdir(src)
E       FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/nb_conda_kernels/conda/envs/tæst_env2/share/jupyter/kernels/python3'

in shutil.copytree:

../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.6/site-packages/jupyter_client/kernelspec.py:345: in install_kernel_spec
    shutil.copytree(source_dir, destination)

Reference: https://github.com/Anaconda-Platform/nb_conda_kernels/runs/1137417932

Googling the problem, there are some reports of the problem: https://vstinner.github.io/python30-listdir-undecodable-filenames.html.

I tried passing bytes. But then this is the jupyter code that is complaining: https://github.com/Anaconda-Platform/nb_conda_kernels/runs/1140670111

_Originally posted by @fcollonval in https://github.com/Anaconda-Platform/nb_conda_kernels/pull/184#discussion_r495735879_

mcg1969 commented 8 months ago

I'm unable to reproduce this now, and have removed the skip from the test. https://github.com/Anaconda-Platform/nb_conda_kernels/pull/259/files