# Always getting modulenotfound for deployment using yaml file

**URL:** <https://discuss.ray.io/t/always-getting-modulenotfound-for-deployment-using-yaml-file/14075>\
**Category:** Uncategorized\
**Created:** [March 20, 2024, 7:23am UTC](https://discuss.ray.io/t/always-getting-modulenotfound-for-deployment-using-yaml-file/14075 "2024-03-20T07:23:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Debojyoti\_Chakrabort](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/debojyoti_chakrabort/32/5873_2.png) [@Debojyoti\_Chakrabort](https://discuss.ray.io/u/Debojyoti_Chakrabort)\
**Post date:** [March 20, 2024, 7:23am UTC](https://discuss.ray.io/t/always-getting-modulenotfound-for-deployment-using-yaml-file/14075/1 "2024-03-20T07:23:03Z")

</div>

Hello,

I have one application with single model defined in a python file let’s say inference:app where app I defined as a variable `Model.bind()` , everytime I try to deploy a python file using `serve deploy config.yaml` and when I check status it always throwing module not found error the model I want to deploy. My question is how to deploy using config.yaml a local python file which contains the model deployment code ? I am sharing my yaml file little bit later.

I tried following this documentation but it doesn’t worked.

> **[ray.serve.Application — Ray 2.43.0](https://docs.ray.io/en/latest/serve/api/doc/ray.serve.Application.html)**

My yaml looks like this :

```auto
proxy_location: ...

http_options: 
  host: ...
  port: ...
  request_timeout_s: ...
  keep_alive_timeout_s: ...

grpc_options:
  port: ...
  grpc_servicer_functions: ...

logging_config:
  log_level: ...
  logs_dir: ...
  encoding: ...
  enable_access_log: ...

applications:
- name: ...
  route_prefix: ...
  import_path: inference:app
  runtime_env: ... 
  deployments:
  - name: ...
    num_replicas: ...
    ...

```

My another question is this why it always replace the default application deployed to Ray serve , my ray version is : 2.9.3
