跳至內容
選單
此問題已被標幟
3 回覆
8732 瀏覽次數

When i try to restore database backup to another server (digital ocean to test server on aws), showing an error like this, i tried to change odoo commit same as the live server in the test 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:\ 'res\.users\(20,\)\.image_128'

During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

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:\ 'res\.partner\(12809,\)\.image_128'

During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

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,\ 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\(321,\)\.datas'

During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

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(321,).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/c5/c54d3d5e2b1320083bf5378b7c195b0985fa04c1'

頭像
捨棄

are you trying with the database dump[pg_dump] file without filestore?

作者

trying to restore a backup to test server, which took from frond-end  (web/database/manager)

In database manager which option you are selecting for "Backup Format"?

作者

zip including filestore

Please mention database size and hold old is the DB?

作者

231 MB only

Please check postgres version in new and older server using these commands:- Server version: pg_config --version and Client version: psql --version

作者

Both servers have the same version
# pg_config --version
PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1)
# psql --version
psql (PostgreSQL) 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1)

最佳答案

before restoring a database just create a test database and install all your custom modules in it and once that is done restore your database , this should solve your problem

頭像
捨棄
作者

I've installed all the custom modules to the new server, still the issue not resolved .

最佳答案

Hi, I have the same problem. I tried to follow your suggestion of creating a test server, "ABC", installed all the modules and custom modules on it and tried to restore to server ABC with http://localhost:8069/web/database/manager, clicking "Restore Database", select the backup .zip file of the old database, and named the restore database also as "ABC" (same name as the test database), but odoo said "ABC" already exists and won't let me restore. Please advise how you do it. Thanks.

Regards,
Simon

頭像
捨棄

What issue you are facing when you try to restore database backup normally?

The restoration is successful. After that, when I login, I see the cache error as muhammed noufal described in the eclipse console. I am running odoo in eclipse.

Hi,

I am using odoo 14 on ubuntu 20.04. I tried to copy a database to a new development machine. In the origin server, I use back up in odoo web/database/manager in .zip format. I then go to the development machine and use odoo web/database/manager to restore the database. The restoration is ok and I am able to start odoo on the development machine. But I get the following error. Can you tell me how to solve this? Thanks.

Regards,
Simon Lee

----------------------------------------------

Traceback (most recent call last):
File "/home/hago_admin/odoo14/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 "/home/hago_admin/odoo14/odoo/fields.py", line 972, in __get__
value = env.cache.get(record, self)
File "/home/hago_admin/odoo14/odoo/api.py", line 796, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'res.users(2,).image_128'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/hago_admin/odoo14/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 "/home/hago_admin/odoo14/odoo/fields.py", line 972, in __get__
value = env.cache.get(record, self)
File "/home/hago_admin/odoo14/odoo/api.py", line 796, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'res.partner(3,).image_128'

During handling of the above exception, another exception occurred:

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

During handling of the above exception, another exception occurred:

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

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/hago_admin/odoo14/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 "/home/hago_admin/odoo14/odoo/fields.py", line 972, in __get__
value = env.cache.get(record, self)
File "/home/hago_admin/odoo14/odoo/api.py", line 796, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'ir.attachment(16,).raw'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/hago_admin/odoo14/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: '/home/hago_admin/.local/share/Odoo/filestore/hago_db_3/c5/c54d3d5e2b1320083bf5378b7c195b0985fa04c1'

You are choosing "This database was moved" for the database option. And you are not copying filestore to the system. You have to copy the filestore to "/home/hago_admin/.local/share/Odoo"

作者 最佳答案

Now it's working,
Increased aws free instance resource - 1 gb ram + 5gb swap
changed limit_time_cpu = 99999 and limit_time_real = 99999
installed all the custom module in a database on the same server,
while restoring - choose This database was moved instead of This database is a copy 

Thanks @Jo , @Baiju KS

頭像
捨棄

If you choose "This database was moved" option, you won't get filestore. If it's pg_dump file, you can choose this option.

作者

@Baiju ks database is a copy also working

相關帖文 回覆 瀏覽次數 活動
3
8月 24
2794
1
12月 24
2958
3
6月 16
7074
0
7月 23
2051
1
8月 21
6195