Skip to Content
Menu
This question has been flagged
3 Replies
6973 Views

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'

Avatar
Discard

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

Author

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"?

Author

zip including filestore

Please mention database size and hold old is the DB?

Author

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

Author

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)

Best Answer

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

Avatar
Discard
Author

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

Best Answer

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

Avatar
Discard

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"

Author Best Answer

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

Avatar
Discard

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

Author

@Baiju ks database is a copy also working

Related Posts Replies Views Activity
3
Aug 24
1579
1
Aug 22
1935
3
Jun 16
6051
0
Jul 23
1266
1
Aug 21
5182