I added a new module for printing report in a module yesterday.Today when I tried to login to the openerp software an error occurs .
OpenERP Server Error
Client Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/http.py", line 204, in dispatch response["result"] = method(self, **self.params) File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 864, in authenticate req.session.authenticate(db, login, password, env) File "/opt/openerp/server/openerp/addons/web/session.py", line 115, in authenticate uid = self.proxy('common').authenticate(db, login, password, env) File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/opt/openerp/server/openerp/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server/openerp/netsvc.py", line 292, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 433, in dispatch return fn(*params) File "/opt/openerp/server/openerp/service/web_services.py", line 444, in exp_authenticate res_users = pooler.get_pool(db).get('res.users') File "/opt/openerp/server/openerp/pooler.py", line 49, in get_pool return get_db_and_pool(db_name, force_demo, status, update_module)[1] File "/opt/openerp/server/openerp/pooler.py", line 33, in get_db_and_pool registry = RegistryManager.get(db_name, force_demo, status, update_module) File "/opt/openerp/server/openerp/modules/registry.py", line 193, in get update_module) File "/opt/openerp/server/openerp/modules/registry.py", line 219, in new openerp.modules.load_modules(registry.db, force_demo, status, update_module) File "/opt/openerp/server/openerp/modules/loading.py", line 350, in load_modules force, status, report, loaded_modules, update_module) File "/opt/openerp/server/openerp/modules/loading.py", line 256, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/opt/openerp/server/openerp/modules/loading.py", line 159, in load_module_graph load_openerp_module(package.name) File "/opt/openerp/server/openerp/modules/module.py", line 405, in load_openerp_module __import__('openerp.addons.' + module_name) File "/opt/openerp/server/openerp/modules/module.py", line 133, in load_module mod = imp.load_module('openerp.addons.' + module_part, f, path, descr) File "/opt/openerp/server/openerp/addons/print/__init__.py", line 1, in <module> import report File "/opt/openerp/server/openerp/addons/print/report/__init__.py", line 1, in <module> import warranty_info File "/opt/openerp/server/openerp/addons/print/report/warranty_info.py", line 9 SyntaxError: Non-ASCII character '\xe2' in file /opt/openerp/server/openerp/addons/print/report/warranty_info.py on line 9, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details.
My warranty_info.py file is
import time
from openerp.report import report_sxw
class warranty(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(warranty, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
})
report_sxw.report_sxw(
'report.warranty',
'warranty',
'addons/print/report/collection_docket.rml',
parser=warranty
)
In your report return output value string change into unicode please see the link for more details http://stackoverflow.com/questions/10589620/syntaxerror-non-ascii-character-xa3-in-file-when-function-returns