Reputation: 916
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/.local/share/Odoo/filestore/coverpr1/f3/f3f11e52a3ead336749157f46e1c8d8a07de8b61'
Upvotes: 3
Views: 11200
Reputation: 61
If you work with Linux, you can get all records from logfile:
grep 'No such file or directory' /var/log/odoo/odoo.log| cut -d'/' -f 10 | sort| uniq > /tmp/2delete.txt
And open the file and create an SQL syntax for each line found.
Example
DELETE FROM ir_attachment WHERE store_fname LIKE '%ff3fb425a0e573436f30d1377e3e74ba095b3a4d%';
Next, execute all SQL sentences in your database.
I my case:
psql myOdooDB -U odooUser < /tmp/2deleteSQLFormat.txt
Upvotes: 1
Reputation: 916
I have solved it by deleting all the records from ir_attachment
table. Use the query below to solve the problem.
DELETE FROM ir_attachment;
Upvotes: 7
Reputation: 71
If you delete all the records from ir_attachment then it will delete the attachment from all modules where ever we have attached our documents.
Upvotes: 0
Reputation: 31
Try this:
DELETE FROM ir_attachment WHERE url LIKE '/web/content/%';
Upvotes: 3