Erreur due à l'absence de certains fichiers de filestore dans la base de données.
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/odoo/filestore/ceil_prod/71/71167b7052bf3257d59b8db0491c13a22dd75958' kissa15 | 2024-04-17 11:18:02,635 1 INFO ? werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:02] "GET /web/static/lib/bootstrap/css/bootstrap.css HTTP/1.1" 200 - - - - kissa15 | 2024-04-17 11:18:02,671 1 INFO ceil_prod werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:02] "GET /web/assets/89-6d97960/web.report_assets_pdf.min.css HTTP/1.1" 404 - 2 0.006 0.077 kissa15 | 2024-04-17 11:18:02,678 1 INFO ceil_prod werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:02] "GET /web/assets/126-c42c333/web.report_assets_common.min.js HTTP/1.1" 200 - 2 0.017 0.059 kissa15 | 2024-04-17 11:18:02,712 1 INFO ceil_prod werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:02] "GET /web/assets/125-da61895/web.report_assets_common.min.css HTTP/1.1" 200 - 2 0.012 0.109 kissa15 | 2024-04-17 11:18:02,714 1 INFO ceil_prod werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:02] "GET /web/assets/123-df68a27/web.assets_common.min.js HTTP/1.1" 200 - 2 0.018 0.087 kissa15 | 2024-04-17 11:18:02,970 1 INFO ? werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:02] "GET /universite_mosta_diplome/static/src/img/font_diplome.jpg HTTP/1.1" 200 - - - - kissa15 | 2024-04-17 11:18:03,113 1 INFO ? werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:03] "GET /web/static/fonts/lato/Lato-Reg-webfont.woff HTTP/1.1" 200 - - - - kissa15 | 2024-04-17 11:18:03,191 1 INFO ? werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:03] "GET /web/static/fonts/lato/Lato-Bla-webfont.woff HTTP/1.1" 200 - - - - kissa15 | 2024-04-17 11:18:03,195 1 INFO ? werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:03] "GET /web/static/fonts/lato/Lato-Bol-webfont.woff HTTP/1.1" 200 - - - - kissa15 | 2024-04-17 11:18:03,199 1 INFO ? werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:03] "GET /web/static/fonts/lato/Lato-Hai-webfont.woff HTTP/1.1" 200 - - - - kissa15 | 2024-04-17 11:18:03,201 1 INFO ? werkzeug: 127.0.0.1 - - [17/Apr/2024 11:18:03] "GET /web/static/fonts/lato/Lato-Lig-webfont.woff HTTP/1.1" 200 - - - - kissa15 | 2024-04-17 11:18:03,861 1 INFO ceil_prod odoo.addons.base.models.ir_attachment: _read_file reading /var/lib/odoo/filestore/ceil_prod/71/71167b7052bf3257d59b8db0491c13a22dd75958 kissa15 | Traceback (most recent call last): kissa15 | File "/usr/lib/python3/dist-packages/odoo/api.py", line 879, in get kissa15 | return field_cache[record._ids[0] kissa15 | KeyError: 89 kissa15 | kissa15 | During handling of the above exception, another exception occurred: kissa15 | kissa15 | Traceback (most recent call last): kissa15 | File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1057, in __get__ kissa15 | value = env.cache.get(record, self) kissa15 | File "/usr/lib/python3/dist-packages/odoo/api.py", line 882, in get kissa15 | raise CacheMiss(record, field) kissa15 | odoo.exceptions.CacheMiss: 'ir.attachment(89,).datas'
Pour corriger cette erreur, nous devons supprimer les enregistrements de la base de données correspondant à ces fichiers manquants.
- Accéder au conteneur de la base de données
- Se connecter à la base de données
- Supprimer le fichier qui est enregistré dans la table ir_attachment dont le chomp est store_fname
$ docker exec -it container_db bash $ psql -U odoo $ \c BD_name $ DELETE FROM ir_attachment WHERE store_fname = 'b3/b3d86b2a52ba1fd6395106a127a40ced70d98c5f';
Note : Le fichier b3/b3d86b2a52ba1fd6395106a127a40ced70d98c5f
est celui qui est mentionné dans le journal d'erreurs.