I have a little functionality here where i'm pulling information
from a web2py server and displaying it on a kivy app for the user, all the
other details are displaying but the image is failing to display & I
get the error: [ERROR ] [AsyncImage ] Not found <person.image.9c6d5fece48d877e.SU1HLTIwMjIwOTE2LVdBMDAwMC5qcGc=.jpg>.
def read_from_server(self):
self.root.ids.display_screen.clear_widgets()
response = requests.get("
http://localhost:8000/clients/default/api_list_clients")
if response.status_code == 200:
print("Response content:", response.content)
try:
data = response.json()
clients = data.get("clients", [])
for client in clients:
name = client.get("name")
surname = client.get("surname")
cell = client.get("cell")
email = client.get("email")
image_url = client.get("image") details_layout = BoxLayout(orientation='vertical', spacing=10)
name = MDLabel(text=name, halign="center")
surname=MDLabel(text=surname, halign='center')
cell=MDLabel(text=cell, halign='center')
email=MDLabel(text=email, halign='center')
details_layout.add_widget(name)
details_layout.add_widget(surname)
details_layout.add_widget(cell)
details_layout.add_widget(email)
image = AsyncImage(source=image_url) details_layout.add_widget(image) self.root.ids.display_screen.add_widget(details_layout)
except json.JSONDecodeError as e:
print("Error parsing JSON response:", e)
elif response.status_code == 204:
# Handle empty response (No Content)
print("No clients found.")
else:
print("Failed to read from server. Status code:", response.status_code)