I tried to list all the available functions by calling this
list_functions = functions.list()
This 64440ec6e53a950b0858 function id is included in list_functions, now this is my main code:
for index, row in df.iterrows():
audio_file_id = row['$id']
file_name = row['name']
data={"audio_id":audio_file_id, "name":file_name}
json_encode = json.dumps(data)
create_copy = functions.create_execution("64440ec6e53a950b0858", data= json_encode)
create_copy
# print("result ", index, ": ",data)
break
But it gives me this:
Error: 500 Server Error: Internal Server Error for url
Return:
{"message":"Function with the requested ID could not be found.","code":404,"type":"function_not_found","version":"1.3.1"}
Hi - let me look into this
what does the create_execution method give you if you do not add data param
still the same Ms.
is this a bug Ms? @joeyouss
It does not seem like a bug, can you check how did you make your API key? we usually need API keys for authentication and they need to be created with execution.write scope, can you confirm this was done?
Can you share a bit more of your code?
the api have this scopes
I will private message my colab link @joeyouss @Ponguta_
replied to you in DMs
I have replied to you
Did you fix it @Mosh Ontong ?
Not yet
can i see the code too?
I will dm it to you sir @Steven
what's the full error from appwrite docker logs for the 500 error?
And 2 more things:
- I got the code to run by changing the create_exection to:
create_copy = functions.create_execution("64440ec6e53a950b0858", "{}", False)
- I think the function was executed successfully, but the function itself had problems. What do the function logs show?
How can I view the logs? Since I hosted my appwrite in digital ocean?
Ohhhhh thank you steve, this code works thank youuu
same as any self-hosted setup. Your appwrite folder is probably at /root/appwrite. See https://appwrite.io/docs/debugging#logs
Hi I have some issue with function execution via request. My request looks like this:
from appwrite.client import Client
from appwrite.services.functions import Functions
client = Client()
(client
.set_endpoint(api_endpoint) # Your API Endpoint
.set_project(project_ID) # Your project ID
.set_key(api_key) # Your secret API key
)
functions = Functions(client)
result = functions.create_execution(function_ID, data=json.dumps({
'before': before,
'after': after,
'responder': responder,
}))```
Through payload my cloud function receives data needed for work. Same request worked for earlier appwrite version but my company requested me to work with the newer one and that's when the problem started. Request above throws an error like this:
``` File "/home/jan/.local/lib/python3.10/site-packages/appwrite/client.py", line 109, in call
raise AppwriteException(response.json()['message'], response.status_code, response.json().get('type'), response.json())
appwrite.exception.AppwriteException: Server Error
How to wokr though this error ?
It would be best to create a new post rather than posting in an old thread
Recommended threads
- Urgent help required - Could not resolve...
I upgraded my production environment to 1.8.0 but experienced issues with appwrite running out of worker threads. I downgraded back to 1.6.1 and restored the da...
- Function permissions
In my app I have a CreateUser flow which makes several documents and at the end uses the functions.createExecution() to call a server-side function to create a ...
- The file size is either not valid or exc...
Hello, I am receiving the following error when I am trying to deploy a function from my local. ``` > appwrite push functions --function-id xxxxxxxxx ℹ Info: Va...