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

Hello,

I have set all config files including odoo.conf and launch.json. When I running the vscode I encounter with below error:

  File "/home/morteza/nak_project/odoo/odoo-server/odoo-bin", line 5, in 
    import odoo
  File "/home/morteza/nak_project/odoo/odoo-server/odoo/__init__.py", line 97, in
    PyPDF2.filters.decompress = _decompress

PyPDF2 has no filter attribute
odoo.conf file:
[options]
; Is This ThePassword That Allows Database Operations:
admin_passwd =MP@123456
db_host = False
db_port = False
db_user = morteza
db_password = False
addons_path =/home/morteza/nak_project/odoo/odoo-server/odoo/addons,/home/morteza/nak_project/odoo/odoo-server/custom/custom_addons
xmlrpc_port = 8069
launch.json file:
{
    "version": "0.2.0",
    "configurations": [

               
        {
            "name": "Python:Odoo",
            "type":"python",
            "request":"launch",
            "stopOnEntry": false,
            "python":"${command:python.interpreterPath}",
            "console":"integratedTerminal",
            "program":"${workspaceRoot}/odoo-bin",
            "args": [
               "--config=/home/morteza/nak_project/odoo/odoo-server/odoo.conf",
            ],
            "cwd":"${workspaceRoot}",
            "env": {},
            "envFile":"${workspaceRoot}/.env",
            "redirectOutput": true,

        }
    ]
}


moreover my directory includes myenv and odoo-server files

Thanks in advance

아바타
취소
작성자 베스트 답변

I am new in odoo development. I am trying to run odoo through vscode. my directory includes conf file including odoo.conf, myenv, custom and odoo directory.

my odoo.conf file is as below

[options]
admin_passwd =MP@123456
db_host = localhost
db_port = False
db_user = morteza
db_password = MP@123456
addons_path =/home/morteza/nak_project/odoo/odoo-server/odoo/addons,/home/morteza/nak_project/odoo/odoo-server/custom/custom_addons
http_port = 8069

Also, myenv is my virtual environment. How can i run odoo by vscode

아바타
취소

What the error you are getting now? is it the same error?
what the python version you are using?

If you are using python virtual environment (myenv), you have to install it in the virtual environment after activate your environment

베스트 답변

Odoo 12.0 required python library  PyPDF2==1.26.0 to be installed. please make sure you are using this version.

So uninstall the current version:

pip uninstall PyPDF2

and install the below version:

pip install PyPDF2==1.26.0


아바타
취소
관련 게시물 답글 화면 활동
Odoo Installation 해결 완료
3
1월 24
32567
Certificate Error 해결 완료
4
1월 24
7498
1
11월 20
22199
3
10월 19
3069
2
6월 19
15341