jbn / nbmerge

A tool to merge / concatenate Jupyter (IPython) notebooks
MIT License
83 stars 6 forks source link

Boundary key source path annotation fails on Windows when using notebooks from different drive #12

Open petebachant opened 5 years ago

petebachant commented 5 years ago
    annotate_source_path(nb, base_dir, path, boundary_key)
  File "C:\Users\pete\AppData\Local\Continuum\anaconda3\lib\site-packages\nbmerge\__init__.py", line 37, in annotate_source_path
    cells[0].metadata[boundary_key] = os.path.relpath(nb_path, base_dir)
  File "C:\Users\pete\AppData\Local\Continuum\anaconda3\lib\ntpath.py", line 584, in relpath
    path_drive, start_drive))
ValueError: path is on mount 'c:', start on mount 'D:'
jbn commented 5 years ago

Hey Pete. I'm a week away from my dissertation defense and very behind. If I haven't closed this in about two weeks, please ping me again. Thanks!

petebachant commented 5 years ago

No sweat. I will see if I can figure out what's going on. Good luck with the defense!

petebachant commented 5 years ago

Feel free to unsubscribe to reduce stress while you're getting ready. I will post some notes here.

https://stackoverflow.com/questions/40448938/valueerror-path-is-on-mount-c-start-on-mount-f-while-django-migrations-i

petebachant commented 5 years ago

Best solution may be to catch the ValueError and simply use the notebook base name. Would like to create a test for this on AppVeyor, which may require creating a separate virtual disk.

petebachant commented 5 years ago

Hope your dissertation defense went well! Just pinging this issue again since I haven't worked on it yet. It's not holding up the project I'm using it for, however.