OpenERP与Visual Studio的Python工具编译错误

0 投票
1 回答
841 浏览
提问于 2025-04-17 18:46

我正在尝试在Visual Studio 2012中使用Python工具来构建和运行OpenERP服务器。

目前我遇到了超过2300个错误信息,大多数都是类似这样的:

unexpected token 'x1'

我下载了openerp-server-6.0.4的源代码,并在VS中从现有的Python代码创建了一个新的Python项目。当系统提示时,我选择了OpenERP源代码的路径(C:\OpenERP\Bin),并设置按F5键时要执行的文件为openerp-server.py。我选择了Python 64位 3.3的解释器。

项目创建完成,但在构建之前,我就收到了很多意外的符号错误。例如,在account.py文件中,它抱怨在以下代码中出现了意外的符号'tax':

 tax.type=='code':
            address = address_id and obj_partener_address.browse(cr, uid, address_id) or None
            localdict = {'price_unit':cur_price_unit, 'address':address, 'product':product, 'partner':partner}
            exec tax.python_compute in localdict
            amount = localdict['result']
            data['amount'] = amount

当我使用工具 > Python工具 > 在Python交互式窗口中执行项目时,我看到以下结果:

Python交互窗口。输入$help可以查看命令列表。

重置执行引擎

交互窗口尚未启动。

正在运行C:\temp\openerp-server-6.0.4\bin\openerp-server.py

追踪记录(最近的调用在最前面):

文件"C:\temp\openerp-server-6.0.4\bin\openerp-server.py",第64行,

import tools

文件"C:\temp\openerp-server-6.0.4\bin\tools__init__.py",第23行,

import win32

ImportError: 没有名为'win32'的模块

有没有人能指导我如何在VS中构建和运行OpenERP?这可能吗?

谢谢!

1 个回答

0

你需要安装这个东西:

http://www.py2exe.org/index.cgi/PyOpenGL

请在安装这个模块之后再试试。

撰写回答