Tòónz ඞ
Tòónz ඞ
CDCloudflare Developers
Created by Tòónz ඞ on 6/4/2024 in #workers-help
Error Code: 10021 on Dashboard
:heart_spin_blue:
4 replies
CDCloudflare Developers
Created by Tòónz ඞ on 6/4/2024 in #workers-help
Can I use Requests library in a Python Worker
Ok... No matter whatever package I put in requirements.txt it still gives me that. This is the code in index.py
from js import Response

def on_fetch(request):
print("Hi there!")
return Response.new("Hello World!")
from js import Response

def on_fetch(request):
print("Hi there!")
return Response.new("Hello World!")
And this is what's in requirements.txt
httpx
httpx
And this is the Error
TypeError: response.body.arrayBuffer is not a function
at async Object.fetch (.../Worker/node_modules/miniflare/dist/src/workers/core/entry.worker.js:1024:22)
TypeError: response.body.arrayBuffer is not a function
at async Object.fetch (.../Worker/node_modules/miniflare/dist/src/workers/core/entry.worker.js:1024:22)
7 replies