Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Artificial Intelligence
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Property Management
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Odoo 14: request not bound to a database

Subscriure's

Get notified when there's activity on this post

This question has been flagged
databaserestoreodoo
2 Respostes
9045 Vistes
Avatar
Bao Dang

I am trying to run Odoo 14 in my developing environment by restoring database from Prod and stuck at this issue. 


raise RuntimeError('request not bound to a database')


2022-10-20 07:06:44,575 21365 INFO ? werkzeug: 127.0.0.1 - - [20/Oct/2022 07:06:44] "GET /web/webclient/translations/5227498d9df4b403b0244c75aac21e0c091e50ce?lang=en_US HTTP/1.1" 404 - 1 0.003 0.019
2022-10-20 07:06:44,592 21365 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 1500, in _dispatch_nodb
result = request.dispatch()
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 810, in dispatch
r = self._call_function(**self.params)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 360, in _call_function
return self.endpoint(*args, **kwargs)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 916, in __call__
return self.method(*args, **kw)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/addons/web/controllers/main.py", line 951, in qweb
content = HomeStaticTemplateHelpers.get_qweb_templates(mods, db, debug=request.session.debug, bundle=bundle)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/addons/web/controllers/main.py", line 575, in get_qweb_templates
return cls(addons, db, debug=debug)._get_qweb_templates(bundle)[0]
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/addons/web/controllers/main.py", line 561, in _get_qweb_templates
for path, addon, _ in self._get_asset_paths(bundle):
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/addons/web/controllers/main.py", line 551, in _get_asset_paths
return request.env['ir.asset']._get_asset_paths(addons=self.addons, bundle=bundle, xml=True)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 244, in env
self._env = odoo.api.Environment(self.cr, self.uid, self.context)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 214, in cr
raise RuntimeError('request not bound to a database')
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/noufal/ODOO-Git/odoo/odoo15/venv/lib/python3.10/site-packages/werkzeug/serving.py", line 319, in run_wsgi
execute(self.server.app)
File "/home/noufal/ODOO-Git/odoo/odoo15/venv/lib/python3.10/site-packages/werkzeug/serving.py", line 308, in execute
application_iter = app(environ, start_response)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/service/server.py", line 482, in app
return self.app(e, s)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/service/wsgi_server.py", line 112, in application
return application_unproxied(environ, start_response)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/service/wsgi_server.py", line 87, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 1336, in __call__
return self.dispatch(environ, start_response)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 1302, in __call__
return self.app(environ, start_wrapped)
File "/home/noufal/ODOO-Git/odoo/odoo15/venv/lib/python3.10/site-packages/werkzeug/middleware/shared_data.py", line 287, in __call__
return self.app(environ, start_response)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 1533, in dispatch
result = _dispatch_nodb()
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 1502, in _dispatch_nodb
return request._handle_exception(e)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 748, in _handle_exception
return super(HttpRequest, self)._handle_exception(exception)
File "/home/noufal/ODOO-Git/odoo/odoo15/odoo15/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
RuntimeError: request not bound to a database - - -

0
Avatar
Descartar
Ermin Trevisan

Please post a readable traceback and provide the necessary context.

Bao Dang
Autor

So I was restoring our production database to my development environment and get this message:

Exception has occurred: RuntimeError (note: full exception trace is shown but execution is paused at: env)request not bound to a database File "D:\Gearment\ODOO\GM_Odoo\odoo\http.py", line 228, in cr raise RuntimeError('request not bound to a database') File "D:\Gearment\ODOO\GM_Odoo\odoo\http.py", line 258, in env (Current frame) self._env = odoo.api.Environment(self.cr, self.uid, self.context) File "D:\Gearment\ODOO\GM_Odoo\odoo\tools\translate.py", line 431, in _get_lang lang = request.env.lang File "D:\Gearment\ODOO\GM_Odoo\odoo\tools\translate.py", line 473, in _get_translation lang = self._get_lang(frame) File "D:\Gearment\ODOO\GM_Odoo\odoo\tools\translate.py", line 447, in __call__ translation = self._get_translation(source) File "D:\Gearment\ODOO\GM_Odoo\odoo\addons_ent\account_invoice_extract\models\account_invoice.py", line 36, in ERROR_INTERNAL: _("An error occurred"), File "D:\Gearment\ODOO\GM_Odoo\odoo\addons_ent\account_invoice_extract\models\__init__.py", line 4, in from . import account_invoice File "D:\Gearment\ODOO\GM_Odoo\odoo\addons_ent\account_invoice_extract\__init__.py", line 4, in from . import models File "D:\Gearment\ODOO\GM_Odoo\odoo\modules\module.py", line 358, in load_openerp_module __import__('odoo.addons.' + module_name) File "D:\Gearment\ODOO\GM_Odoo\odoo\modules\loading.py", line 178, in load_module_graph load_openerp_module(package.name) File "D:\Gearment\ODOO\GM_Odoo\odoo\modules\loading.py", line 346, in load_marked_modules loaded, processed = load_module_graph( File "D:\Gearment\ODOO\GM_Odoo\odoo\modules\loading.py", line 449, in load_modules processed_modules += load_marked_modules(cr, graph, File "D:\Gearment\ODOO\GM_Odoo\odoo\modules\registry.py", line 89, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "D:\Gearment\ODOO\GM_Odoo\odoo\service\db.py", line 308, in restore_db registry = odoo.modules.registry.Registry.new(db) File "D:\Gearment\ODOO\GM_Odoo\odoo\service\db.py", line 41, in if_db_mgt_enabled return method(self, *args, **kwargs) File "D:\Gearment\ODOO\GM_Odoo\odoo\addons\web\controllers\main.py", line 1186, in restore db.restore_db(name, data_file.name, str2bool(copy)) File "D:\Gearment\ODOO\GM_Odoo\odoo\http.py", line 530, in response_wrap response = f(*args, **kw) File "D:\Gearment\ODOO\GM_Odoo\odoo\http.py", line 911, in __call__ return self.method(*args, **kw) File "D:\Gearment\ODOO\GM_Odoo\odoo\http.py", line 359, in _call_function return self.endpoint(*args, **kwargs) File "D:\Gearment\ODOO\GM_Odoo\odoo\http.py", line 805, in dispatch r = self._call_function(**self.params) File "D:\Gearment\ODOO\GM_Odoo\odoo\http.py", line 1439, in _dispatch_nodb result = request.dispatch() File "D:\Gearment\ODOO\GM_Odoo\odoo\http.py", line 1466, in dispatch result = _dispatch_nodb() File "D:\Gearment\ODOO\GM_Odoo\odoo\http.py", line 1262, in __call__ return self.app(environ, start_wrapped) File "D:\Gearment\ODOO\GM_Odoo\odoo\http.py", line 1294, in __call__ return self.dispatch(environ, start_response) File "D:\Gearment\ODOO\GM_Odoo\odoo\service\wsgi_server.py", line 99, in application_unproxied result = odoo.http.root(environ, start_response) File "D:\Gearment\ODOO\GM_Odoo\odoo\service\wsgi_server.py", line 124, in application return application_unproxied(environ, start_response) File "D:\Gearment\ODOO\GM_Odoo\odoo\service\server.py", line 440, in app return self.app(e, s)

Avatar
NESRINE ESSAIES
Best Answer

add db_name = database_name to your config file

1
Avatar
Descartar
Avatar
Bao Dang
Autor Best Answer

Sorted it out by removing all cached from source code then checkout and re-run it./

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Restore database from Odoo 12 to Odoo 16 Solved
database restore odoo
Avatar
Avatar
1
de febr. 24
79
clean purchase history
database odoo
Avatar
Avatar
1
de març 24
3635
"Restoring Odoo Online to Day One: Returning to Initial Conditions" Solved
database restore
Avatar
Avatar
Avatar
2
de des. 23
5381
How can I recover ownership? Solved
database odoo
Avatar
Avatar
1
de febr. 23
3910
Odoo database failed Solved
database odoo
Avatar
Avatar
1
de des. 22
14342
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now