Back

The getter 'data' isn't defined for the type 'Execution

  • 1
  • General
  • Flutter
  • Functions
  • Cloud
Arif Qayoom
19 Jul, 2024, 11:38

Getting The error "The getter 'data' isn't defined for the type 'Execution'. Try importing the library that defines 'data', correcting the name to the name of an existing getter, or defining a getter or field named 'data'."

TL;DR
Issue: Developer is encountering the error "The getter 'data' isn't defined for the type 'Execution' in Flutter while accessing data from a function execution. Solution: The correct attribute to access data returned from the Function execution is `responseBody` instead of `data`, as per the SDK documentation. The `data` attribute is not present in the returned object.
Ryan
19 Jul, 2024, 11:40

I'm not too familiar with Flutter, but the documentation shows that the returned object doesn't have a data attribute https://appwrite.io/docs/references/cloud/models/execution

Arif Qayoom
19 Jul, 2024, 11:44

but I how can I resolve it

Ryan
19 Jul, 2024, 11:46

The link I sent shows the properties on the object returned from the SDK, there is no data property but it looks like you might be looking for responseBody instead? What exactly are you trying to achieve?

Arif Qayoom
19 Jul, 2024, 11:48

I am trying to create a function that scrabs website data using Python but I am now on flutter & this error shows up

Ryan
19 Jul, 2024, 11:48

So you're trying to get the data returned from the Function?

Ryan
19 Jul, 2024, 11:57

If you're trying to access the data returned from the Function execution, then it's likely you'll want to use responseBody instead of data

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more