Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

Path error on windows #27

Open
zuypt opened this issue Jun 9, 2020 · 2 comments
Open

Path error on windows #27

zuypt opened this issue Jun 9, 2020 · 2 comments

Comments

@zuypt
Copy link

zuypt commented Jun 9, 2020

I encounter this error when running dharma on Windows
Traceback (most recent call last): File "d:\softwares\python\python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "d:\softwares\python\python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\softwares\Python\Python38\Scripts\dharma.exe\__main__.py", line 9, in <module> File "d:\softwares\python\python38\lib\site-packages\dharma\dharma.py", line 71, in main dharma.process_grammars(args.grammars) File "d:\softwares\python\python38\lib\site-packages\dharma\core\dharma.py", line 520, in process_grammars grammars.insert(0, open(os.path.relpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), File "d:\softwares\python\python38\lib\ntpath.py", line 703, in relpath raise ValueError("path is on mount %r, start on mount %r" % ( ValueError: path is on mount 'd:', start on mount 'E:'

Suggest fix:
remove os.path.relpath in dharma.py:517
grammars.insert(0, open(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.path.normcase(path))))

@jschwartzentruber
Copy link
Contributor

Thanks for reporting this. Would you be able to make a pull-request for your fix?

@zuypt
Copy link
Author

zuypt commented Jun 16, 2020

Thanks for reporting this. Would you be able to make a pull-request for your fix?

sorry too much hassle for such a small change

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

No branches or pull requests

2 participants