Odoo filestore missing - odoo-14

I want to set up a new Odoo development instance in a docker container with data from the live instance (running outside of docker).
To copy the database inside the docker container I followed these steps:
sudo docker cp dump.sql db_docker_name:/dump.sql
sudo docker exec -it --user postgres db_docker_name /bin/bash
psql database_name < dump.sql
ALTER DATABASE database_name OWNER TO odoo;
sudo docker exec docker_name pip3 install xmlschema # and all the other requirements
I get the error:
2022-10-17 08:10:29,024 1 INFO dblive odoo.addons.base.models.ir_attachment: _read_file reading /var/lib/odoo/filestore/dblive/6a/6ad87633490735f27b4f73d8d984193d8d7d6947
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/api.py", line 789, 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 "/usr/lib/python3/dist-packages/odoo/fields.py", line 970, in __get__
value = env.cache.get(record, self)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 793, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'ir.attachment(52,).datas'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/api.py", line 789, 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 "/usr/lib/python3/dist-packages/odoo/fields.py", line 970, in __get__
value = env.cache.get(record, self)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 793, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'ir.attachment(52,).raw'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_attachment.py", line 102, in _file_read
with open(full_path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/odoo/filestore/dblive/6a/6ad87633490735f27b4f73d8d984193d8d7d6947'
Inside the container I have these files:
odoo#95198003ea0a:~/filestore/dblive$ ls
16 18 86 checklist d0 e7 fa
How can I solve this?
Thank you

Solved it by copying the original filestore into the new one.
docker cp filestore/. dev_odoo_1:/var/lib/odoo/filestore/dblive

Related

I install pyaudio many times But not working? ERROR: Cannot uninstall 'PyAudio'

ModuleNotFoundError: No module named 'pyaudio'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\Omkar_Bhatuse\Downloads\VoiceBot\Voice_bot.py", line 15, in
with sr.Microphone() as source:
File "C:\Users\Omkar_Bhatuse\Downloads\VoiceBot\venv\lib\site-packages\speech_recognition_init_.py", line 79, in init
self.pyaudio_module = self.get_pyaudio()
File "C:\Users\Omkar_Bhatuse\Downloads\VoiceBot\venv\lib\site-packages\speech_recognition_init_.py", line 110, in get_pyaudio
raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
(venv) PS C:\Users\Omkar_Bhatuse\Downloads\VoiceBot>
install it using command prompt then try to use the package from the site-packages folder in the python interrupter

Odoo 12 : Changes are not visible when updating existing module

I am trying to update some static text in template name ajax_login_template.xml inside website_ajax_login module.
I have restored an existing dump file without any errors.
The issue is that I can't see the changes after updating the app in developer mood.
But the changes get visible as expected when I use a new database instead of the dumped version and fresh install website_ajax_login_module. To simplify my question and what I did as follows:
First Attempt
Step 1 -> Restore dump file into a database.
Step 2 -> Update template.xml file
Step 3 -> Activate Developer Mood and upgrade the App. i.e. `website_ajax_login`
Result ===> Changes Not Visible.
Also if I click on top menu item "Customize -> HTML/CSS editor". No windows open at the right side of the screen.
Second Attempt
Step 1: Go to web database manager view
Step 2: Create a database (not restore list in the first attempt)
Step 3: Install website_ajax_login app
Result ====> Changes Visible I made in the template.xml file.
if I click on top menu item "Customize -> HTML/CSS editor". The window opens on the right side of the screen without any problem.
Is there some cache etc involved in this error. When using the dumped version of my database, I see the error logs as follows.
2020-05-18 10:58:57,541 127210 INFO archixpress odoo.addons.base.models.ir_attachment: _read_file reading /home/shahzeb/.local/share/Odoo/filestore/archixpress/bd/bdbf3e6ea7597eb4b2305c7e8e083430facaa1b2
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/api.py", line 1039, in get
value = self._data[key][field][record._ids[0]]
KeyError: 38054
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/fields.py", line 976, in __get__
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/odoo/api.py", line 1041, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('ir.attachment(38054,).datas', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/shahzeb/Projects/Wiztech/odoo/odoo/odoo/addons/base/models/ir_attachment.py", line 113, in _file_read
r = base64.b64encode(open(full_path,'rb').read())
FileNotFoundError: [Errno 2] No such file or directory: '/home/shahzeb/.local/share/Odoo/filestore/archixpress/bd/bdbf3e6ea7597eb4b2305c7e8e083430facaa1b2'
2020-05-18 10:58:57,561 127210 INFO archixpress werkzeug: 127.0.0.1 - - [18/May/2020 10:58:57] "GET /web/image/38054/160x160/ HTTP/1.1" 304 - 5 0.009 0.041
2020-05-18 10:58:57,575 127210 INFO archixpress odoo.addons.base.models.ir_attachment: _read_file reading /home/shahzeb/.local/share/Odoo/filestore/archixpress/26/269f4b4e91c4bc57d9d535ad3c8fcd907d975031
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/api.py", line 1039, in get
value = self._data[key][field][record._ids[0]]
KeyError: 38056
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/fields.py", line 976, in __get__
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/odoo/api.py", line 1041, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('ir.attachment(38056,).datas', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/shahzeb/Projects/Wiztech/odoo/odoo/odoo/addons/base/models/ir_attachment.py", line 113, in _file_read
r = base64.b64encode(open(full_path,'rb').read())
FileNotFoundError: [Errno 2] No such file or directory: '/home/shahzeb/.local/share/Odoo/filestore/archixpress/26/269f4b4e91c4bc57d9d535ad3c8fcd907d975031'
2020-05-18 10:58:57,578 127210 INFO archixpress werkzeug: 127.0.0.1 - - [18/May/2020 10:58:57] "GET /web/image/38056/160x160/ HTTP/1.1" 304 - 5 0.009 0.041
2020-05-18 10:58:58,001 127210 INFO archixpress werkzeug: 127.0.0.1 - - [18/May/2020 10:58:58] "POST /web/dataset/call HTTP/1.1" 200 - 3 0.051 0.032
2020-05-18 10:58:58,079 127210 INFO archixpress werkzeug: 127.0.0.1 - - [18/May/2020 10:58:58] "POST /website/translations HTTP/1.1" 200 - 12 0.116 0.142
2020-05-18 10:58:58,095 127210 INFO archixpress odoo.addons.base.models.ir_attachment: _read_file reading /home/shahzeb/.local/share/Odoo/filestore/archixpress/cd/cd5a21b5fca4934040122813fb0d1214003f6ca7
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/api.py", line 1039, in get
value = self._data[key][field][record._ids[0]]
KeyError: 38113
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/fields.py", line 976, in __get__
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/odoo/api.py", line 1041, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('ir.attachment(38113,).datas', None)
During handling of the above exception, another exception occurred:
As a test, I Created a new module and every thing works fine with new module.
Had a similar problem because someone had altered the view using debug tools inside Odoo. The solution can be found on this question: https://stackoverflow.com/a/43650510

Google-cloud-sdk install failing with in invalid syntax

/home/sohail//google-cloud-sdk/install.sh
Welcome to the Google Cloud SDK!
Traceback (most recent call last):
File "/home/sohail//google-cloud-sdk/bin/bootstrapping/install.py", line 27, in
from googlecloudsdk import gcloud_main
File "/home/sohail//google-cloud-sdk/lib/googlecloudsdk/gcloud_main.py", line 37, in
from googlecloudsdk.command_lib.util.apis import yaml_command_translator
File "/home/sohail//google-cloud-sdk/lib/googlecloudsdk/command_lib/util/apis/yaml_command_translator.py", line 241
if self.spec.async:
^
SyntaxError: invalid syntax
Script execution failed!
Exiting with status 1.

python - control the browser with selenium module

I installed python version 3.5.2, selenium version 3.0.1 and firefox version 49.0.2.
After all of that and in my shell scripting I typed
>>> from selenium import webdriver
>>> browser = webdriver.Firefox()
and got error as this below:
Could someone guide me on what is wrong here.
I appreciate it. I am just starting out on python. Thanks
#
Traceback (most recent call last):
File "C:\Users\D\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\common\service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "C:\Users\D\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "C:\Users\D\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
browser = webdriver.Firefox()
File "C:\Users\D\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 135, in __init__
self.service.start()
File "C:\Users\D\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\common\service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
#

Kivy - OSError, Still Apps Run Successfully?

Every time I run a Kivy app I see OSError (see it in last line of my given example). Even though my app runs successfully. What could be the cause of this error?
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/dist-packages/kivy/input/providers/mtdev.py", line 197, in _thread_run
_device = Device(_fn)
File "/usr/lib/python2.7/dist-packages/kivy/lib/mtdev.py", line 131, in __init__
self._fd = os.open(filename, os.O_NONBLOCK | os.O_RDONLY)
OSError: [Errno 13] Permission denied: '/dev/input/event5'
This error is not important, it just means that kivy checked the possible input providers in your OS and found that this one is forbidden.