Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: path is on mount 'c:', start on mount 'D:' #217

Open
Pit-Storm opened this issue Sep 11, 2019 · 2 comments
Open

Error: path is on mount 'c:', start on mount 'D:' #217

Pit-Storm opened this issue Sep 11, 2019 · 2 comments

Comments

@Pit-Storm
Copy link

I'm using Anaconda3 on Windows 10. It's installed on Drive C. My .md file is on Drive D and the Destination should got to drive D. I have an .cfg-file to configure the rendering. Landslide ver 1.1.6

The cfg contains:
[landslide] source = D:\\git-repos\mueller.pet\workshop-git-docker\02_workshop.md destination = D:\\git-repos\mueller.pet\workshop-git-docker\02_workshop.html relative = False linenos = table

I tried relative paths and paths with / instead \. Same error.

When I run the landslide command with name-of-cfg.cfg it show the following error:

Error: path is on mount 'c:', start on mount 'D:'
With Debug output it is:
Traceback (most recent call last): File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\mueller.pet\AppData\Local\Continuum\anaconda3\envs\landslide\Scripts\landslide.exe\__main__.py", line 9, in <module> File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\site-packages\landslide\main.py", line 169, in main run(input_file, options) File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\site-packages\landslide\main.py", line 160, in run generator.Generator(input_file, **options.__dict__).execute() File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\site-packages\landslide\generator.py", line 208, in execute self.write_and_log() File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\site-packages\landslide\generator.py", line 221, in write_and_log self.write() File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\site-packages\landslide\generator.py", line 545, in write html = self.render() File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\site-packages\landslide\generator.py", line 502, in render context = self.get_template_vars(slides) File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\site-packages\landslide\generator.py", line 418, in get_template_vars 'css': self.get_css(), 'js': self.get_js(), File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\site-packages\landslide\generator.py", line 314, in get_css 'path_url': utils.get_path_url(print_css, self.relative), File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\site-packages\landslide\utils.py", line 12, in get_path_url return os.path.relpath(path) File "c:\users\mueller.pet\appdata\local\continuum\anaconda3\envs\landslide\lib\ntpath.py", line 562, in relpath path_drive, start_drive)) ValueError: path is on mount 'c:', start on mount 'D:'

How to solve this?

@Pit-Storm
Copy link
Author

Referring to this discussion: https://bugs.python.org/issue7195

Meybe os.relpath() ist not the correct function to use when there are absolute paths. Espacially in windows context when you change over drives from python installation to data folders. But which one is the right one?

@Pit-Storm
Copy link
Author

A local workaround could be:

  • Go to the disk management system tool
  • select the drive where your source and destination is located.
  • select "Edit drive letter and path" (could be different naming, i translated it from german)
  • mount the drive to a empty NTFS folder on the same drive where your python installation is located.
  • before running the landslide command cd to the source-files via the new c-path.
  • maybe you have to edit your .cfg-file to the ne c-path.

This is really tweaky, but it works locally for every user individually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant