Using Visual Studio Code 1.60 and 1.61 on two different Windows 10 PCs with Ubuntu 20.04 in WSL and Visual Studio Code 1.61 on Ubuntu 20.04 native are all exhibiting this behavior when trying to run Odoo 13 CE through the debugger. This just happened after restarting Visual Studio Code. No problems before. I can run without the debugger and it's fine. Did this just happen to anyone else?
Exception has occurred: KeyError (note: full exception trace is shown but execution is paused at: __getitem__)None File "/opt/odoo13/odoo/odoo/modules/registry.py", line 177, in __getitem__
return self.models[model_name]
File "/opt/odoo13/odoo/odoo/api.py", line 463, in __getitem__ (Current frame)
return self.registry[model_name]._browse(self, (), ())
File "/opt/odoo13/odoo/odoo/fields.py", line 715, in resolve_depends
field_model = model.env.get(field.comodel_name)
File "/opt/odoo13/odoo/odoo/modules/registry.py", line 273, in setup_models
dependencies[field] = set(field.resolve_depends(model))
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 369, in load_modules
registry.setup_models(cr)
File "/opt/odoo13/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo13/odoo/odoo/service/server.py", line 1190, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/opt/odoo13/odoo/odoo/service/server.py", line 510, in run
rc = preload_registries(preload)
File "/opt/odoo13/odoo/odoo/service/server.py", line 1287, in start
rc = server.run(preload, stop)
File "/opt/odoo13/odoo/odoo/cli/server.py", line 172, in main
rc = odoo.service.server.start(preload=preload, stop=stop)
File "/opt/odoo13/odoo/odoo/cli/server.py", line 178, in run
main(args)
File "/opt/odoo13/odoo/odoo/cli/command.py", line 60, in main
o.run(args)
File "/opt/odoo13/odoo/odoo-bin", line 8, in
odoo.cli.main()
Hi,
I have the exact same issue on my setup after restarting Visual Studio Code.
Visual Studio Code version 1.61 on Linux Mint 20 Cinnamon.
Were you able to solve it on your side ?
Thanks in advance
No solution yet, annoyingly I'm using print statements. If I don't find a fix within a week I'm going to switch to Pycharm.