Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
59993 Lượt xem

I've Working on Image Customize module in odoo v9.
For some reason, my code, that used to working, is now having trouble in .py file. balck screen shows me error just like below:


Traceback (most recent call last):

File "/home/ayaz/workspace/odoo-9.0_latest/openerp/addons/base/ir/ir_attachment.py", line 151, in _file_read

r = open(full_path,'rb').read().encode('base64')

IOError: [Errno 2] No such file or directory: u'/home/cntn/.local/share/Odoo/filestore/v9_FSS_DB/00/009fe84ee464a909d233dde13a0156d0fed3782c'

Ảnh đại diện
Huỷ bỏ

when I try to restore a database to another server,

Traceback (most recent call last):
File "/odoo14/odoo14-server/odoo/api.py", line 792, in get
field_cache = field_cache[record.env.cache_key(field)]
KeyError: (None,)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/odoo14/odoo14-server/odoo/fields.py", line 972, in __get__
value = env.cache.get(record, self)
File "/odoo14/odoo14-server/odoo/api.py", line 796, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'ir.attachment(135,).raw'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/odoo14/odoo14-server/odoo/addons/base/models/ir_attachment.py", line 105, in _file_read
with open(full_path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/odoo14/.local/share/Odoo/filestore/APL_2.0/e5/e5f5cedc94621342914b576e5e67040802eb442c'

Câu trả lời hay nhất

In the database run the command, the number in like show in the log error, delete cod errors

e69e06808b908fc0d85ebfea58fbc7df3788e72e

delete

FROM

"public"."ir_attachment"

WHERE

"public"."ir_attachment"."store_fname" LIKE '%9739bf1f391e10051ed840fef5b341f9351d0536%'



UPDATE:


odoo needs create the "odoo" system user, the calls for file temp redirects to: /opt/odoo  in your log

have :home/cntn/  the files existing in /opt/odoo, run the process with user "odoo"

Ảnh đại diện
Huỷ bỏ

This should be the accepted answer and it did work in my case. Just run the DELETE command with the ending file name for each error you are receiving in the log file, then restart the server, and voila!

Bài viết liên quan Trả lời Lượt xem Hoạt động
6
thg 10 20
8162
1
thg 1 16
3491
1
thg 9 20
4231
3
thg 4 18
30508
0
thg 1 16
3748