nbmerge icon indicating copy to clipboard operation
nbmerge copied to clipboard

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

Open petebachant opened this issue 6 years ago • 5 comments

    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:'

petebachant avatar Apr 03 '19 20:04 petebachant

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!

jbn avatar Apr 03 '19 21:04 jbn

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

petebachant avatar Apr 04 '19 13:04 petebachant

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 avatar Apr 04 '19 13:04 petebachant

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 avatar Apr 04 '19 13:04 petebachant

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.

petebachant avatar May 13 '19 13:05 petebachant