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

git.util Failed checking if running in CYGWIN due to: FileNotFoundError(2, '系统找不到指定的文件。', None, 2, None) #113

Open
yileli opened this issue Jul 21, 2021 · 8 comments

Comments

@yileli
Copy link

yileli commented Jul 21, 2021

When I run main.py, it occurs that:

(pymarl) D:\star\pymarl>python src/main.py --config=qmix --env-config=sc2 with env_args.map_name=2s3z
[DEBUG 14:29:26] git.cmd Popen(['git', 'version'], cwd=D:\star\pymarl, universal_newlines=False, shell=None, istream=None)
[DEBUG 14:29:26] git.cmd Popen(['git', 'version'], cwd=D:\star\pymarl, universal_newlines=False, shell=None, istream=None)
[DEBUG 14:29:26] git.util Failed checking if running in CYGWIN due to: FileNotFoundError(2, '系统找不到指定的文件。', None, 2, None)
[INFO 14:29:26] root Saving to FileStorageObserver in results/sacred.
[DEBUG 14:29:29] pymarl Using capture mode "fd"

Can you help me solve it? Thanks.

@hijkzzz
Copy link

hijkzzz commented Aug 6, 2021

please use any linux x64

@happyfir
Copy link

happyfir commented Aug 13, 2021

please use any linux x64
Does this mean to deploy the pymarl on linux x64
l try to run this on windows10 and have the same problem
@hijkzz

@yanangao1709
Copy link

have you solved this problem?

@happyfir
Copy link

happyfir commented Dec 2, 2021

have you solved this problem?

I run it on ubuntu

@CapacitorSet
Copy link

CapacitorSet commented Nov 17, 2023

I had the same issue. Running with strace revealed that something was calling /usr/bin/uname, but on my machine uname was at /bin/uname.

This should fix it:

sudo ln -sv /usr/bin/uname $(which uname)

@alexanderLinear
Copy link

alexanderLinear commented Nov 22, 2024

I spent a tiny little bit more of research:

git.util looks for the "git" command and gets its path. (Its probably the CYGWIN folder its looking for.)
Then the path is used for operating 'uname' to get certain value from that program - which might be some "cygwin" string. (but the code that i have linked below is not doing any sort of checks, just presences... i would not trust that right now to be an sort of sane check method concept/design.)
The exception might happen for when there is no uname aside to git in those folder. (Other root causes are possible.)

For the fix (the above proposal has seemingly the wrong order of arguments for 'ln' anyways. it is <existing_target> <new_link_name>) this might serve you - at least in principle:

$ which git
/usr/local/bin/git
$ sudo ln -sv $(which uname) /usr/local/bin/uname
'/usr/local/bin/uname' -> '/usr/bin/uname'

some(!) code reference - see about Line 405: https://www.atlas.aei.uni-hannover.de/work/yifan.wang/newsearch/env/lib64/python3.7/site-packages/git/util.py

@alexanderLinear
Copy link

PS: here is some more reliable code sequence (for bash shell) that demonstrates how to get the "CYGWIN" string for comparison.
Maybe it has its reason to first look for uname aside to git - but there is no fallback path at all, if there is no such file. the code will only issue the problematic exception message instead. and as pinpointed, i feel like the code totally misses checking for the returned string.

https://stackoverflow.com/a/3466183/3423146

@alexanderLinear
Copy link

issued a ticket for GitPython folks.

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

6 participants