AttributeError when setting limit argument in get_activities
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Inizia in ayon_api/_api_helpers/activities.py intorno alla riga 99 e riproduci il problema con lo script get_activities fornito usando limit=10. Traccia il motivo per cui activities_field è None prima della chiamata a set_limit. Il lavoro è completato quando get_activities accetta limit senza generare AttributeError e restituisce non più del numero di attività richiesto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is there an existing issue for this?
- I have searched the existing issues and added correct labels.
Description
Current Behavior
Specifying the limit argument when calling get_activities, will raise the following error :
Traceback (most recent call last):
File "<string>", line 8, in <module>
File "C:\Users\user\AppData\Local\Ynput\AYON\app\AYON 1.6.3\dependencies\ayon_api\_api_helpers\activities.py", line 99, in get_activities
activities_field.set_limit(limit)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'set_limit'
Expected Behavior
It should be possible to set the limit argument.
Steps To Reproduce:
Here is a small script that you can run in the AYON launcher console or with ayon_api directly with the right env vars set up. By running it you'll get the aforementioned error.
from ayon_api import get_activities
activities = get_activities(
project_name="projectname",
limit=10
)
for activity in activities:
print(activity)
Removing limit from this script and calling get_activities with project_name only will work (but be careful as it'll likely query all activities!).
Additional context:
Version
Server : 1.15.17
Launcher : 1.4.2 and 1.6.3
ayon-python-api : 1.2.4, 1.2.22 and 1.2.23
What platform were you running when you found the bug?
Windows
Relevant log output:
- Lingua principale
- Python
- Stelle
- 16
- Fork
- 15
- Merge medio
- 1g 9h
- PR unite (30g)
- 10
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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.
Altre issue di ynput/ayon-python-api
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
ynput/ayon-python-api#350 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
ynput/ayon-python-api#199 ·
-
ynput/ayon-python-api#198 · 1 assegnatario ·
-
Implement ayon uris endpoint Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
ynput/ayon-python-api#182 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
ynput/ayon-python-api#181 ·
Tutte le issue di ynput/ayon-python-api
Issue simili
-
bug ci good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
documentation
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
inmanta/inmanta-core#10835 ·
-
sponsored
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
Diaoul/subliminal#1382 ·