pytype
pytype copied to clipboard
Error of paths with spaces (Linux)
I am using latest version of pytype with a folder with space and get the error:
$ pwd
/home/user/workspace/folder/subfolder/2019/test/Foregone Solution
$ pytype solution.py
Computing dependencies
Analyzing 1 sources with 0 local dependencies
ninja: Entering directory `/home/user/workspace/folder/subfolder/2019/test/Foregone Solution/.pytype'
ninja: error: dependency cycle: /home/user/workspace/folder/subfolder/2019/test/Foregone -> /home/user/workspace/folder/subfolder/2019/test/Foregone
If I rename the folder to Foregone Solution
to ForegoneSolution
$ pytype solution.py
Computing dependencies
Analyzing 1 sources with 0 local dependencies
ninja: Entering directory `/home/user/workspace/folder/subfolder/2019/test/ForegoneSolution/.pytype'
[1/1] check solution
Success: no errors found
Ha, that's not the error I would've expected (dependency cycle?), but I'm not surprised that we can't handle paths with spaces. I don't think that's tested anywhere. Thanks for the report!
A consequence is that Pytype cannot straightforwardly operate upon files store in a Google Drive (since the directory structure by default takes a form such as ~/'Google Drive File Stream'/'My Drive'/...)
I am facing the same issue, but with different error thrown:
ninja: Entering directory `/var/lib/jenkins/jobs/ic-iom Build and Release/workspace/.pytype'
ninja: error: build.ninja:13: multiple rules generate /var/lib/jenkins/jobs/ic-iom [-w dupbuild=err]
What's interesting is that ninja enters the right directory, but then obviously it does not escape the whitespaces in the path.
I am also encountering this error, with the "multiple rules generate" error message.