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

I have a module with the following code

from openerp.osv import orm, fields

from openerp.tools.translate import _

import os, sys

import win32print


When I install the module I get an error "ImportError: No module named win32print"

아바타
취소

install win32print on your system, it is missing.

작성자

I installed python-2.7.10.msi I also installed pywin32-219.win32-py2.7.exe Is there any other configuration I must make for odoo to pick win32print

베스트 답변

Just two years late, I have an answer for this.

The point is not only to install python module, but also to let Odoo know about it.

I have downloaded pypiwin32 (i.e. the pip version of pywin32), and I have copied \win32 under the \server folder of Odoo.

Now I can see \server\win32\win32print.pyd (among many other files)

Odoo searches modules in \server, not in \server\win32, so it cannot find that.

I don't know what is the correct way to add a sys.path in Odoo, anyway, the following works:


import sys
FOLDER = 'C:\\Program Files (x86)\\Odoo 10.0\\server\\win32' # or wherever you installed it
if not FOLDER in sys.path: 
    sys.path.append(FOLDER) import win32print
아바타
취소
작성자

Thanx, I wish I had enough karma to vote

관련 게시물 답글 화면 활동
8
5월 25
43244
1
6월 23
2811
3
1월 24
15832
1
1월 22
5394
4
2월 24
12783