콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
7157 화면

I set the Visual Studio code following the various guides that I found on the web, with some I have made changes to adapt it to the 10.0 version of Odoo, when starting up, but I find this error:

 File "/home/XXX/.virtualenvs/odooenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2245, in declare_namespace
    path = sys.modules[parent].__path__
KeyError: 'odoo'

on my virtualenv I have never installed odoo with pip, and on pycharm I never had any of these problems

This is my configuration of visual studio:

launch.json

 {
             "name": "Python Odoo",
            "type": "python",
            "request": "launch",
            "stopOnEntry": false,
            //"pythonPath": "${config.python.pythonPath}",
            //"program": "${file}", use this to debug opened file.
            "program": "/opt/XXX/Projects/odoo/odoo-bin",
            "args": [
              "-c /home/XXX/Projects/odoo/odoo.conf"
            ],},

Can you help me? thanks in advance


PS:

If you need other information let me know.

EDIT:

Another problem
/opt/XXX/Projects/odoo/odoo-bin "-c /home/XXX/Projects/odoo/odoo.conf"
Usage: odoo-bin [options]
odoo-bin: error: The config file ' /home/XXX/Projects/odoo/odoo.conf' selected with -c/--config doesn't exist or isnot readable, use -s/--save if you want to generate it
아바타
취소
작성자 베스트 답변

Solved!

It was necessary to divide the parameters word by word as in the code, I hope you serve someone

"args": [
"--config",
"/home/XXX/Projects/odoo/odoo.conf",
// "-u", //update
// "", //"module"
"--db_user",
"odoo",
"-d", 
"XXXXXX_DB",
"--max-cron-threads=0"
  ],
아바타
취소
관련 게시물 답글 화면 활동
2
4월 25
2887
5
3월 25
19111
1
6월 24
1891
1
5월 24
1891
1
3월 24
2887