# Email validation fails with Fault: 'ValidatedEmail' object has no attribute 'normalized'

**URL:** https://discuss.tryton.org/t/email-validation-fails-with-fault-validatedemail-object-has-no-attribute-normalized/8417
**Category:** System Administrator
**Created:** [March 17, 2025, 12:28pm UTC](https://discuss.tryton.org/t/email-validation-fails-with-fault-validatedemail-object-has-no-attribute-normalized/8417 "2025-03-17T12:28:44Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![xHArw](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/x/6bbea6/32.png) [@xHArw](https://discuss.tryton.org/u/xHArw)
#### Post date: [March 17, 2025, 12:28pm UTC](https://discuss.tryton.org/t/email-validation-fails-with-fault-validatedemail-object-has-no-attribute-normalized/8417/1 "2025-03-17T12:28:44Z")

</div>

I installed tryton on a Debian stable using the bookworm-7.0 m9s.biz sources. When entering an email address the following error is shown:

```auto
Traceback (most recent call last):
  File "/trytond/wsgi.py", line 109, in dispatch_request
    return endpoint(request, **request.view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/protocols/dispatcher.py", line 43, in rpc
    return methods.get(request.rpc_method, _dispatch)(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/wsgi.py", line 75, in wrapper
    return func(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/protocols/wrappers.py", line 200, in wrapper
    return func(request, pool, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/protocols/dispatcher.py", line 201, in _dispatch
    result = rpc.result(meth(inst, *c_args, **c_kwargs))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/model/modelview.py", line 51, in wrapper
    result = func(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/model/fields/field.py", line 124, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/modules/party/contact_mechanism.py", line 236, in on_change_value
    return self._change_value(self.value, self.type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/model/fields/field.py", line 124, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/modules/party/contact_mechanism.py", line 224, in _change_value
    self.value = self.format_value(value=value, type_=type_)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/model/fields/field.py", line 124, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/modules/party/contact_mechanism.py", line 204, in format_value
    value = normalize_email(value)
            ^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/tools/email_.py", line 57, in normalize_email
    return emailinfo.normalized
           ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ValidatedEmail' object has no attribute 'normalized'

Fault: 'ValidatedEmail' object has no attribute 'normalized'

```

Therefor I cannot save the party, due to:

```auto
The values of "Contact Mechanisms" are not valid.

```

The package `python3-email-validator` is installed version `1.3.0-1`. Why is it happening and how can I fix this?

version: `7.0.24-1~12bookworm+1`

---

<div class="post-metadata">

### Author: ![maxx](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/maxx/32/2320_2.png) [@maxx](https://discuss.tryton.org/u/maxx)
#### Post date: [March 17, 2025, 12:53pm UTC](https://discuss.tryton.org/t/email-validation-fails-with-fault-validatedemail-object-has-no-attribute-normalized/8417/2 "2025-03-17T12:53:55Z")

</div>

Your package `python3-email-validator` is too old. It should be at least 2.x

---

<div class="post-metadata">

### Author: ![xHArw](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/x/6bbea6/32.png) [@xHArw](https://discuss.tryton.org/u/xHArw)
#### Post date: [March 17, 2025, 12:58pm UTC](https://discuss.tryton.org/t/email-validation-fails-with-fault-validatedemail-object-has-no-attribute-normalized/8417/3 "2025-03-17T12:58:32Z")

</div>

Thanks for the quick reply. I’ll try to install the version from Debian testing then (not recommended, though). Shouldn’t there be a check somewhere? The tryton suite is bookworm-7.0 and bookworm ships with version 1.3.0-1.

---

<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: [March 17, 2025, 1:21pm UTC](https://discuss.tryton.org/t/email-validation-fails-with-fault-validatedemail-object-has-no-attribute-normalized/8417/4 "2025-03-17T13:21:30Z")

</div>

> [@xHArw](#):
>
> Shouldn’t there be a check somewhere?

It is in the `setup.py` but it is the job of the packagers to implement them in their packages.

---

<div class="post-metadata">

### Author: ![xHArw](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/x/6bbea6/32.png) [@xHArw](https://discuss.tryton.org/u/xHArw)
#### Post date: [March 17, 2025, 1:26pm UTC](https://discuss.tryton.org/t/email-validation-fails-with-fault-validatedemail-object-has-no-attribute-normalized/8417/5 "2025-03-17T13:26:54Z")

</div>

I installed `2.2.0-1` from trixie and it seems to work now. No error and the contact info can be saved. Thanks for the quick replies.

---

<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: [March 18, 2025, 1:27pm UTC](https://discuss.tryton.org/t/email-validation-fails-with-fault-validatedemail-object-has-no-attribute-normalized/8417/6 "2025-03-18T13:27:05Z")

</div>

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