-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Milestone
Description
Problem: jupyter nbconvert --to ${anything} filename.ipynb fails, where ${anything} can be any format supported natively by nbconvert.
How to reproduce: under a directory containing square brackets in its name, create a virtualenv by python3 -m virtualenv rt && . rt/bin/activate && pip install jupyter. Then create an empty notebook file filename.ipynb. On terminal type, e.g., jupyter nbconvert --to html filename.ipynb. Then it fails.
Possible cause of the failure: line 157,158 of file ${VIRTUAL_ENV}/lib/python3.6/site-packages/entrypoints.py:
glob.iglob(osp.join(folder, '*.dist-info', 'entry_points.txt')),
glob.iglob(osp.join(folder, '*.egg-info', 'entry_points.txt')) where glob.iglob treats the square brackets in folder as special character rather than string literal.
Possible solution: change these two lines to
glob.iglob(osp.join(glob.escape(folder), '*.dist-info', 'entry_points.txt')),
glob.iglob(osp.join(glob.escape(folder), '*.egg-info', 'entry_points.txt')) Thanks for checking.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels