For Workes & Pages, what is the name of the domain?
https://learn-do.tirael666.workers.dev
What is the error number?
10061
What is the error message?
Cannot create binding for class MyDurableObjectTest that is not exported by the script
What is the issue or error you’re encountering
Cannot create binding for class MyDurableObjectTest that is not exported by the script
What are the steps to reproduce the issue?
I created a simple python worker
from js import Response
async def on_fetch(request, env):
do_id = env.MY_DURABLE_OBJECT_TEST.idFromName('aaa')
return Response.new("Hello World!")
class MyDurableObjectTest:
def __init__(self, state, env):
self.state = state
self.env = env
async def fetch(self, request):
pass
And a binding in wrangler.toml:
[[durable_objects.bindings]]
name = "MY_DURABLE_OBJECT_TEST"
class_name = "MyDurableObjectTest"
But I’m getting an error when I run deploy:
Cannot create binding for class MyDurableObjectTest that is not exported by the script [code:
10061]
Is there any example how to user Durable Objects with python?