[WinError 123] The syntax for filename, directory name, or volume label is incorrect: ''
See original GitHub issueI try to install pre-commit with the manual from pre-commit.com.
At step 3 I get the following error message on a Windows 10 machine:
[WinError 123] The syntax for filename, directory name, or volume label is incorrect: ''
.pre-commit-config.yaml
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://server/Sandbox/Repo/_git/Repo
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
error information
An unexpected error has occurred: OSError: [WinError 123] Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: ''
Traceback (most recent call last):
File "c:\user\programme\python\python37-32\lib\site-packages\pre_commit\error_handler.py", line 72, in error_handler
yield
File "c:\user\programme\python\python37-32\lib\site-packages\pre_commit\main.py", line 294, in main
_adjust_args_and_chdir(args)
File "c:\user\programme\python\python37-32\lib\site-packages\pre_commit\main.py", line 125, in _adjust_args_and_chdir
os.chdir(git.get_root())
OSError: [WinError 123] Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: ''
–version Python 3.7.3 pre-commit 1.20.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Python WindowsError: [Error 123] The filename, directory ...
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect. I'm not able to find where the issue is. import...
Read more >Python WindowsError: [Error 123] The filename, directory ...
Python WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect · Issue Description · Resolution · What is 'r' ......
Read more >[WinError 123] The filename, directory name, or ... - GitHub
I tried to train the using the 'runner.py' but it came out with this. File "C:\Users\Ilham\AppData\Local\Programs\Python\Python39\lib\site- ...
Read more >[WinError 123] The filename, directory name, or volume label ...
[WinError 123] The filename, directory name, or volume label syntax is incorrect: '<frozen importlib._bootstrap>'.
Read more >The filename, directory name or volume label is incorrect
The issue here is with your string containing the path to the file: "C:\\Users\\LK\\source\repos\dsd-ica-perf\\src\\et.ure.ica.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The next release (probably v1.20.1 when I have some time to release) will include a better error message for this:
I’m also seeing if I can fix this from the
gitside, since the behaviour seems quite strange!This has been released as part of v1.21.0 (it was also fixed in git 1.24 I believe) – thanks again for the issue 🎉!