# \[Serve\] Example script not working

**URL:** <https://discuss.ray.io/t/serve-example-script-not-working/2291>\
**Category:** Ray Serve\
**Created:** [May 26, 2021, 8:00am UTC](https://discuss.ray.io/t/serve-example-script-not-working/2291 "2021-05-26T08:00:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![psytron](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@psytron](https://discuss.ray.io/u/psytron)\
**Post date:** [May 26, 2021, 8:00am UTC](https://discuss.ray.io/t/serve-example-script-not-working/2291/1 "2021-05-26T08:00:08Z")

</div>

Running Example from docs: [Ray Serve: Scalable and Programmable Serving — Ray v2.0.0.dev0](https://docs.ray.io/en/master/serve/index.html)  
Does not work:

`python app_ray_serve.py `

```auto
2021-05-25 21:50:23,406 INFO services.py:1267 -- View the Ray dashboard at http://127.0.0.1:8265
(pid=34596) 2021-05-25 21:50:25,386 INFO http_state.py:67 -- Starting HTTP proxy with name 'fCbsKc:SERVE_CONTROLLER_ACTOR:SERVE_PROXY_ACTOR-node:192.168.1.140-0' on node 'node:192.168.1.140-0' listening on '127.0.0.1:8000'
Traceback (most recent call last):
  File "app_ray_serve.py", line 12, in <module>
    my_func.deploy()
AttributeError: 'function' object has no attribute 'deploy'
(pid=34593) INFO: Started server process [34593]

AttributeError: 'function' object has no attribute 'deploy'

```

---

<div class="post-metadata">

**Author:** ![kai](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/kai/32/3380_2.png) [@kai](https://discuss.ray.io/u/kai)\
**Post date:** [May 26, 2021, 8:07am UTC](https://discuss.ray.io/t/serve-example-script-not-working/2291/2 "2021-05-26T08:07:04Z")

</div>

The script works for me.

Can you confirm which version of python and ray you are running? And on which OS?

cc @simon-mo

---

<div class="post-metadata">

**Author:** ![blshao84](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/blshao84/32/1010_2.png) [@blshao84](https://discuss.ray.io/u/blshao84)\
**Post date:** [May 29, 2021, 3:58am UTC](https://discuss.ray.io/t/serve-example-script-not-working/2291/3 "2021-05-29T03:58:13Z")

</div>

I got exactly the same error. My python version is 3.8.8 and ray version is 1.3.0. Let me know if you need more info

---

<div class="post-metadata">

**Author:** ![psytron](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@psytron](https://discuss.ray.io/u/psytron)\
**Post date:** [June 3, 2021, 12:10am UTC](https://discuss.ray.io/t/serve-example-script-not-working/2291/4 "2021-06-03T00:10:34Z")

</div>

Python 3.8.9, Ray 1.3, Mac OS 10.17

---

<div class="post-metadata">

**Author:** ![Oyin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/oyin/32/1077_2.png) [@Oyin](https://discuss.ray.io/u/Oyin)\
**Post date:** [June 3, 2021, 4:58pm UTC](https://discuss.ray.io/t/serve-example-script-not-working/2291/5 "2021-06-03T16:58:21Z")

</div>

were you able to solve this problem? I also have this error.
