# Ray cross language support kwargs to not support execption

**URL:** <https://discuss.ray.io/t/ray-cross-language-support-kwargs-to-not-support-execption/11681>\
**Category:** Ray Core\
**Created:** [August 4, 2023, 6:16am UTC](https://discuss.ray.io/t/ray-cross-language-support-kwargs-to-not-support-execption/11681 "2023-08-04T06:16:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hliu8dsfsf](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/hliu8dsfsf/32/4881_2.png) [@hliu8dsfsf](https://discuss.ray.io/u/hliu8dsfsf)\
**Post date:** [August 4, 2023, 6:16am UTC](https://discuss.ray.io/t/ray-cross-language-support-kwargs-to-not-support-execption/11681/1 "2023-08-04T06:16:10Z")

</div>

**How severe does this issue affect your experience of using Ray?**

- High: It blocks me to complete my task.

Hi, I am meeting a weird issue Ray cross language support kwargs not support exception, but we are actually only pass args with only one argument to the Java actor not kwargs to the constructor. This seems to be a Ray issue? Or I misunderstand the code?

```auto
  self._java_actor_ref = java_actor_class.remote(config_root_path)
File "/Users/Shared/Projects/my-dsl/build/my-runtime-ray/venv/lib/python3.10/site-packages/ray/actor.py", line 535, in remote
  return self._remote(args=args, kwargs=kwargs, **self._default_options)
File "/Users/Shared/Projects/my-dsl/build/my-runtime-ray/venv/lib/python3.10/site-packages/ray/actor.py", line 885, in _remote
  creation_args = cross_language._format_args(worker, args, kwargs)
File "/Users/Shared/Projects/my-dsl/build/my-runtime-ray/venv/lib/python3.10/site-packages/ray/cross_language.py", line 99, in _format_args
    raise TypeError("Cross language remote functions does not support kwargs.")
TypeError: Cross language remote functions does not support kwargs.

```

The code snippet to init the ray server and job is

```auto
from ray import serve
my_actor_def = serve.deployment(MyExecutor, max_concurrent_queries=1, 
    num_replicas=num_replica)
my_actor_deployment = my_actor_def.bind(workflow, modules, 
     init_fence, gpu_id, app_name, config_root_path, start_as_service)
serve.run(my_driver_deployment, host='0.0.0.0')

```

The place how we are initiatize our Java actor code within the MyExecutor

```auto
  match = re.search(r"^([a-zA-Z._0-9]+)(\[[a-zA-Z_0-9]+\])?$", 
       "com.myspace.operators.JavaOperatorActor")
  java_actor_class = ray.cross_language.java_actor_class(match.group(1))
  method = match.group(2)
  self._java_method = method[1:-1] if method is not None else "exec"
  self._java_actor_ref = java_actor_class.remote("/users/home/path")

```

The ray and ray serve version is 2.5.1 python is 3.10.

---

<div class="post-metadata">

**Author:** ![larrylian](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/larrylian/32/4408_2.png) [@larrylian](https://discuss.ray.io/u/larrylian)\
**Post date:** [August 22, 2023, 8:22am UTC](https://discuss.ray.io/t/ray-cross-language-support-kwargs-to-not-support-execption/11681/2 "2023-08-22T08:22:19Z")

</div>

1. Could you provide the reproducible code code for issue?

2. Can you please check if your code is passing kwargs?
