AttributeError: cffi library 'pygit2._libgit2' has no function, constant or global variable named 'git_remote_save'
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 1.7k
- Fork
- 408
- Merge medio
- 2g 57m
- PR unite (30g)
- 7
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci il traceback nel container python:3.10 con pygit2==1.12.1, quindi esamina pygit2/remote.py intorno a Remote.save e i binding libgit2 inclusi. Verifica in che modo Remote.fetch dovrebbe aggiornare lo stato del repository e se il workflow documentato evita questo simbolo mancante; il lavoro è completato quando l’operazione segnalata non genera più AttributeError e il suo comportamento è coperto o chiaramente documentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, python
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100