Error in Classify Image
@john-matroid ci sta già lavorando.
Dal 28/3/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
When running the following code:
import json
import os
from matroid.client import Matroid
api = Matroid(client_id='XXX', client_secret='XXX')
folder = "/Users/alex/Downloads/frames"
files = [os.path.join(folder, f) for f in os.listdir(folder)]
# Process files in batches of 5
batch_size = 5
results = []
for i in range(0, len(files), batch_size):
batch = files[i:i + batch_size]
batch_result = api.classify_image(detectorId='67ca12fa78705347cded7b1e', file=batch)
results.extend(batch_result)
with open("results.json", "w") as f:
json.dump(results, f, indent=4)
I had this error:
Traceback (most recent call last):
File "/Users/alex/temp1/temp/lib/python3.13/site-packages/matroid/src/images.py", line 36, in classify_image
return batch_file_request(file, method, endpoint, headers, data)
File "/Users/alex/temp1/temp/lib/python3.13/site-packages/matroid/src/helpers.py", line 116, in batch_file_request
% (bytes_to_mb(MAX_LOCAL_IMAGE_BATCH_SIZE))
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: bytes_to_mb() missing 1 required positional argument: 'bytes'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/alex/temp1/get_annotations.py", line 15, in <module>
batch_result = api.classify_image(detectorId='67ca12fa78705347cded7b1e', file=batch)
File "/Users/alex/temp1/temp/lib/python3.13/site-packages/matroid/src/helpers.py", line 18, in setup_and_teardown
response = func(self, *original_args, **original_kwargs)
File "/Users/alex/temp1/temp/lib/python3.13/site-packages/matroid/src/images.py", line 46, in classify_image
raise error.APIConnectionError(message=e)
matroid.error.APIConnectionError: bytes_to_mb() missing 1 required positional argument: 'bytes'
- Lingua principale
- Python
- Stelle
- 18
- Fork
- 5
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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 matroid/matroid-python
-
bug
matroid/matroid-python#20 · 1 commento · 1 assegnatario ·
Tutte le issue di matroid/matroid-python
Issue simili
-
essnmx good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
-
[Feature] 奇物选择添加优先级 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Giskard-AI/giskard-oss#2840 · 1 commento ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Apertaarea: repo bug perceived difficulty: 2
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
yeti-platform/yeti#1380 ·