# Trytond-admin --validate fail

**URL:** https://discuss.tryton.org/t/trytond-admin-validate-fail/5046
**Category:** Developer
**Created:** [February 27, 2022, 10:05am UTC](https://discuss.tryton.org/t/trytond-admin-validate-fail/5046 "2022-02-27T10:05:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![josesalvador](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/josesalvador/32/602_2.png) [@josesalvador](https://discuss.tryton.org/u/josesalvador)
#### Post date: [February 27, 2022, 10:05am UTC](https://discuss.tryton.org/t/trytond-admin-validate-fail/5046/1 "2022-02-27T10:05:16Z")

</div>

I recently update to Tryton 6.0 from Tryton 5.8 and checking integrity data trough `trytond-admin --validate` raises this error:

```auto
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/model.py", line 291, in __getattr__
    return self._values[name]
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/trytond-admin", line 23, in <module>
    admin.run(options)
  File "/usr/local/lib/python3.7/dist-packages/trytond/admin.py", line 125, in run
    validate(options.validate, options.validate_percentage)
  File "/usr/local/lib/python3.7/dist-packages/trytond/admin.py", line 153, in validate
    Model._validate([record])
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/modelstorage.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/modelstorage.py", line 1338, in _validate
    value = getattr(record, field_name)
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/modelstorage.py", line 1467, in __getattr__
    return super(ModelStorage, self). __getattr__ (name)
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/model.py", line 294, in __getattr__
    % (self. __name__ , name, self._values))
AttributeError: 'stock.product_quantities_warehouse' Model has no attribute 'product': None

```

Also, the procedure notes me about invalid time value for ir.cache data:

```auto
1 140413728442176 [2022-02-27 09:51:23,206] ERROR validate ir.cache,26: KO 'The time value "09:20:44.363176" for field "Timestamp" in "Cache" is not valid. - '

```

As a probe, I truncate the ir.cache table to let Tryton generates new clean ir.cache records. After that, executing `trytond-admin --validate` procedure still notes these errors.

---

<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 1, 2022, 2:26pm UTC](https://discuss.tryton.org/t/trytond-admin-validate-fail/5046/2 "2022-03-01T14:26:07Z")

</div>

> [@josesalvador](#):
>
> `AttributeError: 'stock.product_quantities_warehouse' Model has no attribute 'product': None`

I suspect that this model does not work well without proper context. [ProductQuantitiesByWarehouse return negative ids when called without context (#11289) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue11289)

> [@josesalvador](#):
>
> Also, the procedure notes me about invalid time value for ir.cache data:
> 
> ```auto
> 1 140413728442176 [2022-02-27 09:51:23,206] ERROR validate ir.cache,26: KO 'The time value "09:20:44.363176" for field "Timestamp" in "Ca
> 
> ```

I think it is because we use the wrong field definition: [Wrong type for timestamp of ir.cache (#11290) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue11290)
