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
- Tips for Debugging Appwrite Functions Lo...
Hi everyone! π I have an Appwrite Function running locally with Docker, but Iβm struggling to debug it because execution doesnβt reach the breakpoints I set. ...
- AttributeError: 'Context' object has no ...
I'm getting an error executing my function. I'm not able to replicate this locally since I have to use a mock context. Is there a way to debug this kind of erro...
- SyntaxError: The requested module 'node-...
I am trying to use appwrite functions and in the function i am creating rows but i got this error when i executed the funtion. As i checked docs there TablesDB...