AttributeError: cffi library 'pygit2._libgit2' has no function, constant or global variable named 'git_remote_save'
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 1.7k
- Fork
- 408
- Merge trung bình
- 2 ngày 57 phút
- Pull request đã merge (30 ngày)
- 7
Mô tả
I've installed using pip install pygit2==1.12.1. The environment is a python:3.10 docker container.
I'm receiving:
Traceback (most recent call last):
...
File "...", line 197, in pull_repo
remote.save()
File "/app/env/lib/python3.10/site-packages/pygit2/remote.py", line 117, in save
err = C.git_remote_save(self._remote)
AttributeError: cffi library 'pygit2._libgit2' has no function, constant or global variable named 'git_remote_save'. Did you mean: 'git_remote_name'?
The relevant code associated with this error is as follows:
repo = pygit2.Repository(checkout_location)
remote = repo.remotes['origin']
remote.fetch(callbacks=callbacks)
remote.save()
I attempted to use the Remote.save method because the call to Remote.fetch didn't appear to do anything to the repository, which is known to have changed.
Note, I could be using this all wrong, but I would still think an AttributeError shouldn't be raised. Also, there isn't a good example or clear way to do the equivalent of a git pull, which is why I'm fiddling with fetching the remote in order to advance the index.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện traceback trong container python:3.10 với pygit2==1.12.1, sau đó kiểm tra pygit2/remote.py quanh Remote.save và các binding libgit2 đi kèm. Kiểm tra cách Remote.fetch được kỳ vọng sẽ cập nhật trạng thái repository và liệu workflow được ghi lại có tránh được symbol bị thiếu này hay không; hoàn tất khi thao tác được báo cáo không còn gây ra AttributeError và hành vi của nó được kiểm thử hoặc được ghi lại rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- git, python
- Lĩnh vực
- tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100