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

conda instructions lead to git module errors, readme needs to be more clear #20

Open
birdybro opened this issue Jul 20, 2024 · 6 comments

Comments

@birdybro
Copy link

I started out using the docker container, I made a separate issue about the problems with that docker container yesterday. Now I installed anaconda and miniconda on my windows 11 machine.

I followed the instructions from the readme and got stuck at the python src/dactyl_manuform.py step. First it looks as though the module gitpython needs to also be installed by pip and it is missing from the instructions. I installed that, but I still got a new error. Then I modifed it to deal with windows paths multiple times and kept running into the same issues.

(dactyl-keyboard) C:\temp>python src/dactyl_manuform.py
Traceback (most recent call last):
  File "src/dactyl_manuform.py", line 2853, in <module>
    make_dactyl()
  File "src/dactyl_manuform.py", line 284, in make_dactyl
    git_data = get_git_info()
  File "src/dactyl_manuform.py", line 36, in get_git_info
    repo = git.Repo(search_parent_directories=True)
  File "C:\Users\aberu\.conda\envs\dactyl-keyboard\lib\site-packages\git\repo\base.py", line 289, in __init__
    raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: C:\temp

(dactyl-keyboard) C:\temp>python .\src\dactyl_manuform.py
Traceback (most recent call last):
  File ".\src\dactyl_manuform.py", line 2853, in <module>
    make_dactyl()
  File ".\src\dactyl_manuform.py", line 284, in make_dactyl
    git_data = get_git_info()
  File ".\src\dactyl_manuform.py", line 36, in get_git_info
    repo = git.Repo(search_parent_directories=True)
  File "C:\Users\aberu\.conda\envs\dactyl-keyboard\lib\site-packages\git\repo\base.py", line 289, in __init__
    raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: C:\temp

(dactyl-keyboard) C:\temp>python C:\temp\src\dactyl_manuform.py
Traceback (most recent call last):
  File "C:\temp\src\dactyl_manuform.py", line 2853, in <module>
    make_dactyl()
  File "C:\temp\src\dactyl_manuform.py", line 284, in make_dactyl
    git_data = get_git_info()
  File "C:\temp\src\dactyl_manuform.py", line 36, in get_git_info
    repo = git.Repo(search_parent_directories=True)
  File "C:\Users\aberu\.conda\envs\dactyl-keyboard\lib\site-packages\git\repo\base.py", line 289, in __init__
    raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: C:\temp

Then I realized I made to run git clone locally into that folder instead of just ocpying the files since it might be looking for the .git folder and all that... So I did:

(dactyl-keyboard) C:\temp>python C:\temp\src\dactyl_manuform.py
Traceback (most recent call last):
  File "C:\temp\src\dactyl_manuform.py", line 2853, in <module>
    make_dactyl()
  File "C:\temp\src\dactyl_manuform.py", line 284, in make_dactyl
    git_data = get_git_info()
  File "C:\temp\src\dactyl_manuform.py", line 37, in get_git_info
    sha = repo.head.object.hexsha
  File "C:\Users\aberu\.conda\envs\dactyl-keyboard\lib\site-packages\git\refs\symbolic.py", line 288, in _get_object
    return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
  File "C:\Users\aberu\.conda\envs\dactyl-keyboard\lib\site-packages\git\objects\base.py", line 149, in new_from_sha
    oinfo = repo.odb.info(sha1)
  File "C:\Users\aberu\.conda\envs\dactyl-keyboard\lib\site-packages\git\db.py", line 41, in info
    hexsha, typename, size = self._git.get_object_header(bin_to_hex(binsha))
  File "C:\Users\aberu\.conda\envs\dactyl-keyboard\lib\site-packages\git\cmd.py", line 1678, in get_object_header
    return self.__get_object_header(cmd, ref)
  File "C:\Users\aberu\.conda\envs\dactyl-keyboard\lib\site-packages\git\cmd.py", line 1662, in __get_object_header
    return self._parse_object_header(cmd.stdout.readline())
  File "C:\Users\aberu\.conda\envs\dactyl-keyboard\lib\site-packages\git\cmd.py", line 1621, in _parse_object_header
    raise ValueError(err_msg)
ValueError: SHA is empty, possible dubious ownership in the repository at C:\temp.
            If this is unintended run:

                      "git config --global --add safe.directory C:\temp"

So I run git config --global --add safe.directory C:\temp but the same error occurs.

This leads to me realizing that i need to run git clone and stay outside the directory I think... Very confusing.

So I wipe, git clone again and start over and now when I get to the step for conda install -c conda-forge -c cadquery cadquery=master -y the following error occurs:

(dactyl-keyboard) C:\temp>conda install -c conda-forge -c cadquery cadquery=master -y
Channels:
 - conda-forge
 - cadquery
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: | warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - nothing provides _python_rc needed by python-3.12.0rc3-rc3_h2628c8c_1_cpython

Could not solve for environment specs
The following packages are incompatible
├─ cadquery master**  is installable and it requires
│  └─ python >=3.9  with the potential options
│     ├─ python [3.10.0|3.10.1|...|3.9.9], which can be installed;
│     └─ python 3.12.0rc3 would require
│        └─ _python_rc, which does not exist (perhaps a missing channel);
└─ pin-1 is not installable because it requires
   └─ python 3.8.* , which conflicts with any installable versions previously reported.

The current readme is insufficient at getting the output files as intended and probably needs a clean run-thru and troubleshooting to be made functional again. Currently I cannot reproduce any of the output files with it.

@LovesTha
Copy link

Having conda to set up the python env and it not including the required git is :(

@LovesTha
Copy link

Okay, it sure looks like conda.sh is trying to install gitpython, but I ended up the same place you did :(

@phantum29
Copy link

phantum29 commented Sep 11, 2024

Did you ever solve this? The master build seems to (mostly) work aside from a numpy error for bool8. A quick test of master build dockerfile and env files in place of what's included in this release does not solve the issue.

Edit solved for this. Had to edit the Dockerfile and add the line gitpython=3.1.43 \ after numpy=1 \ however now I run into more errors. I had to make sure the dir was sync'd with the repo to get rid of some other errors about git source. I made a new issue request.

@birdybro
Copy link
Author

I did not. I have no idea how to fix this issue, I'm just a user and don't have much familiarity with the toolchain or anything. Just was posting the bug. I merely followed the instructions as directed and this was the result.

@LovesTha
Copy link

I have a PR open to help with some of these issues: #21

@naknak987
Copy link

I initially had the same issue with git not being found. I'm trying to run this on Windows 11 inside a Ubuntu WSL shell with anaconda. Installing gitpython with pip solved the issue. After that, everything else ran without a hitch.

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

4 participants