Summary
When integrating the DeepFace library with an Android application using Python Chaquopy, the verify function generates an error: list indices must be integers or slices, not str. This issue occurs despite the same code running correctly in a Python interpreter.
Error Message: list indices must be integers or slices, not str
Occurrence: The error is encountered when invoking the verify function of the DeepFace library within the Android environment.
Behavior:
The code executes without issues in a standalone Python interpreter.
The same code, when executed in the Android application through Chaquopy, results in the mentioned error.
Steps to Reproduce:
Integrate the DeepFace library in an Android application using Chaquopy.
Configure the application and ensure the library is installed successfully.
Execute the verify function with valid image paths or URLs.
Observe the error: list indices must be integers or slices, not str.
Debugging Attempts:
Verified that the input variables passed to the verify function are correct and match the expected types.
Tried using both local storage image paths and online image URLs as input.
Ensured that the latest version of the DeepFace library (0.0.92) is being used.
Expected Behavior
The verify function should execute without errors and return the verification results.
Actual Behavior
The verify function raises an error: list indices must be integers or slices, not str.
Request
Please investigate and resolve this issue to ensure the verify function works correctly within the Android application using Chaquopy. Any insights or fixes would be greatly appreciated.
Reproducible example
from deepface import DeepFace
# Sample images for verification
img1_path = "image1.jpg" # Local storage path
img2_path = "image2.jpg"
# Verify function call
try:
result = DeepFace.verify(img1_path, img2_path)
print(result)
except Exception as e:
print(f"Error: {e}")
Relevant Log Output
error : list indices must be integers or slices, not str
Expected Result
The verify function should execute without errors and return the verification results.
What happened instead?
The verify function raises an error: list indices must be integers or slices, not str.
Additional Info
If you require any further details or logs, please let me know. Thank you for your assistance!
Before You Report a Bug, Please Confirm You Have Done The Following...
DeepFace's version
0.0.92
Python version
3.8.5
Operating System
windos
Dependencies
Summary When integrating the DeepFace library with an Android application using Python Chaquopy, the verify function generates an error: list indices must be integers or slices, not str. This issue occurs despite the same code running correctly in a Python interpreter.
Environment DeepFace Library Version: 0.0.92 Python Integration Tool: Chaquopy Android Application: Custom-built application using Chaquopy for Python integration Issue Details Error Description:
Error Message: list indices must be integers or slices, not str Occurrence: The error is encountered when invoking the verify function of the DeepFace library within the Android environment. Behavior:
The code executes without issues in a standalone Python interpreter. The same code, when executed in the Android application through Chaquopy, results in the mentioned error. Steps to Reproduce:
Integrate the DeepFace library in an Android application using Chaquopy. Configure the application and ensure the library is installed successfully. Execute the verify function with valid image paths or URLs. Observe the error: list indices must be integers or slices, not str. Debugging Attempts:
Verified that the input variables passed to the verify function are correct and match the expected types. Tried using both local storage image paths and online image URLs as input. Ensured that the latest version of the DeepFace library (0.0.92) is being used.
Expected Behavior The verify function should execute without errors and return the verification results.
Actual Behavior The verify function raises an error: list indices must be integers or slices, not str.
Request Please investigate and resolve this issue to ensure the verify function works correctly within the Android application using Chaquopy. Any insights or fixes would be greatly appreciated.
Reproducible example
Relevant Log Output
error : list indices must be integers or slices, not str
Expected Result
The verify function should execute without errors and return the verification results.
What happened instead?
The verify function raises an error: list indices must be integers or slices, not str.
Additional Info
If you require any further details or logs, please let me know. Thank you for your assistance!