# RPC-Call: Error in Wizard Execute

**URL:** https://discuss.tryton.org/t/rpc-call-error-in-wizard-execute/8301
**Category:** Developer
**Created:** [February 12, 2025, 10:32am UTC](https://discuss.tryton.org/t/rpc-call-error-in-wizard-execute/8301 "2025-02-12T10:32:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Vincenzo](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincenzo/32/847_2.png) [@Vincenzo](https://discuss.tryton.org/u/Vincenzo)
#### Post date: [February 12, 2025, 10:32am UTC](https://discuss.tryton.org/t/rpc-call-error-in-wizard-execute/8301/1 "2025-02-12T10:32:04Z")

</div>

RPC-Call: Error in Wizard Execute

I am using Tryton 7.0 and a web-app that uses RPC-Call.  
The web-app works fine with Tryton. Since switching to Tryton 7, I can’t manage the wizards via RPC-Call in PHP.

I don’t get errors in creating and deleting wizards.

I get errors in the execute. Here is an example:  
RPC-Call:

```auto
$context_mod = array_merge($context,['active_id'=>13, 'active_ids'=>[13], 'active_model'=>'stock.digivoucher', 'action_id'=>624 ]);

$execute_wizard = $rpcClient->cl('wizard.stock.digivoucher.planned_date.define.execute', [41776, ['start'=>['comment'=>'', 'date'=>'2025-02-12']], 'define', $context_mod]);

```

Error:

```auto
Array
(
    [state] => 
    [result] => Array
        (
            [0] => 'str' object cannot be interpreted as an integer
            [1] => Traceback (most recent call last):
  File "/core/trytond/trytond/wsgi.py", line 109, in dispatch_request
    return endpoint(request, **request.view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/trytond/trytond/protocols/dispatcher.py", line 43, in rpc
    return methods.get(request.rpc_method, _dispatch)(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/trytond/trytond/wsgi.py", line 75, in wrapper
    return func(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/trytond/trytond/protocols/wrappers.py", line 200, in wrapper
    return func(request, pool, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/trytond/trytond/protocols/dispatcher.py", line 196, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/core/trytond/trytond/wizard/wizard.py", line 339, in execute
    setattr(record, field, value)
  File "/core/trytond/trytond/model/fields/field.py", line 403, in __set__
    value = self._py_type(value)
            ^^^^^^^^^^^^^^^^^^^^
TypeError: 'str' object cannot be interpreted as an integer

        )
)

```

For date fields, I use the text format in all RPC-Calls and I have never had problems (e.g. “2025-02-13”).

Can you help me solve this problem? Thanks!

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [February 12, 2025, 10:53am UTC](https://discuss.tryton.org/t/rpc-call-error-in-wizard-execute/8301/2 "2025-02-12T10:53:42Z")

</div>

New versions of Tryton become more and more strict about the input data.  
Here is that you provide a string for a Date field but since [Prevent assign SQL value to record instances (51719a6696d5) · Commits · Tryton / Tryton · GitLab](https://code.tryton.org/tryton/commit/51719a6696d5) it is failing.  
So of course it is always better to use the proper format and for JSON-RPC Tryton has defined one for the date (see `trytond/protocols/jsonrpc.py`).  
But I think you can fill an issue because we could restore the support assignation of string value for Date, DateTime, Time, TimeStamp and TimeDelta fields.

---

<div class="post-metadata">

### Author: ![Vincenzo](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincenzo/32/847_2.png) [@Vincenzo](https://discuss.tryton.org/u/Vincenzo)
#### Post date: [February 12, 2025, 11:34am UTC](https://discuss.tryton.org/t/rpc-call-error-in-wizard-execute/8301/3 "2025-02-12T11:34:11Z")

</div>

Thanks CED, you saved my day!

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [February 13, 2025, 11:34am UTC](https://discuss.tryton.org/t/rpc-call-error-in-wizard-execute/8301/4 "2025-02-13T11:34:40Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [February 15, 2025, 12:17am UTC](https://discuss.tryton.org/t/rpc-call-error-in-wizard-execute/8301/5 "2025-02-15T00:17:42Z")

</div>

Ref [Restore support of assigning non-standard value to field (#13873) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/13873)
