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

🐛 [BUG] NotADirectoryError when attempting to run git #264

Closed
fxcoudert opened this issue Nov 7, 2022 · 2 comments
Closed

🐛 [BUG] NotADirectoryError when attempting to run git #264

fxcoudert opened this issue Nov 7, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@fxcoudert
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

After compiling nequip 0.5.5 from source, when trying to use it we see this error:

$ nequip-train config.yaml
Traceback (most recent call last):
  File "/ccc/work/cont003/gen7069/couderfx/nequip/bin/nequip-train", line 33, in <module>
    sys.exit(load_entry_point('nequip==0.5.5', 'console_scripts', 'nequip-train')())
  File "/ccc/work/cont003/gen7069/couderfx/nequip/lib/python3.8/site-packages/nequip-0.5.5-py3.8.egg/nequip/scripts/train.py", line 72, in main
  File "/ccc/work/cont003/gen7069/couderfx/nequip/lib/python3.8/site-packages/nequip-0.5.5-py3.8.egg/nequip/scripts/train.py", line 120, in fresh_start
  File "/ccc/work/cont003/gen7069/couderfx/nequip/lib/python3.8/site-packages/nequip-0.5.5-py3.8.egg/nequip/utils/versions.py", line 48, in check_code_version
  File "/ccc/work/cont003/gen7069/couderfx/nequip/lib/python3.8/site-packages/nequip-0.5.5-py3.8.egg/nequip/utils/versions.py", line 42, in get_current_code_versions
  File "/ccc/work/cont003/gen7069/couderfx/nequip/lib/python3.8/site-packages/nequip-0.5.5-py3.8.egg/nequip/utils/versions.py", line 42, in <dictcomp>
  File "/ccc/work/cont003/gen7069/couderfx/nequip/lib/python3.8/site-packages/nequip-0.5.5-py3.8.egg/nequip/utils/git.py", line 13, in get_commit
  File "/ccc/products2/python3-3.8.10/Rhel_8__x86_64/gcc--8.3.0__openmpi--4.0.1/cuda/lib/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/ccc/products2/python3-3.8.10/Rhel_8__x86_64/gcc--8.3.0__openmpi--4.0.1/cuda/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/ccc/products2/python3-3.8.10/Rhel_8__x86_64/gcc--8.3.0__openmpi--4.0.1/cuda/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: '/ccc/work/cont003/gen7069/couderfx/nequip/lib/python3.8/site-packages/nequip-0.5.5-py3.8.egg/nequip/..'

This does not appear to depend on the details of the config.yaml file, any example from nequip itself will reproduce the issue.

The error is that get_commit calls git with a cwd set by appending /.. to $VENV/lib/python3.8/site-packages/nequip-0.5.5-py3.8.egg/nequip (where VENV is the virtualenv where nequip is installed). But that fails, because nequip-0.5.5-py3.8.egg is not actually a directory, it's a ZIP file, so the OS does not recognise $VENV/lib/python3.8/site-packages/nequip-0.5.5-py3.8.egg/nequip/.. as a valid directory (and rightly so).

Environment (please complete the following information):

  • OS: CentOS Linux release 8.4.2105
  • Python 3.8.10
  • python environment (commands are given for python interpreter):
    • nequip version: 0.5.5
    • e3nn version: 0.5.0
    • pytorch version: 1.10.2

Additional context

nequip was installed in the virtualenv from source by running: python setup.py install

@fxcoudert fxcoudert added the bug Something isn't working label Nov 7, 2022
@fxcoudert
Copy link
Author

Ugly work-around: expand the nequip-0.5.5-py3.8.egg ZIP file into a directory of the same name at the same path.

@Linux-cpp-lisp
Copy link
Collaborator

Hi @fxcoudert ,

Thanks for finding this issue, I think I should have resolved it in d090f32, but let me know. I've never seen this before since for some reason on my systems it never zips the .eggs as far as I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants