尝试运行Odoo时,为什么会出现错误“名称节点不能与'None'常量一起使用”?

如何解决尝试运行Odoo时,为什么会出现错误“名称节点不能与'None'常量一起使用”?

我正在尝试按照github页面上链接的说明在Mac上设置odoo。使用以下命令启动服务器时:

python3 odoo-bin --addons-path=addons -d mydb -i base

服务器启动,在odoo启动页面上看到一个数据库“ mydb”。然后,当我单击该数据库时,出现以下错误:

ERROR mydb werkzeug: Error on request:
    Traceback (most recent call last):
      File "/Users/[username]/Documents/GitHub/odoo/venv/lib/python3.8/site-packages/werkzeug/serving.py",line 270,in run_wsgi
        execute(self.server.app)
      File "/Users/[username]/Documents/GitHub/odoo/venv/lib/python3.8/site-packages/werkzeug/serving.py",line 258,in execute
        application_iter = app(environ,start_response)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/service/server.py",line 439,in app
        return self.app(e,s)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/service/wsgi_server.py",line 142,in application
        return application_unproxied(environ,start_response)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/service/wsgi_server.py",line 117,in application_unproxied
        result = odoo.http.root(environ,start_response)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py",line 1287,in __call__
        return self.dispatch(environ,line 1257,in __call__
        return self.app(environ,start_wrapped)
      File "/Users/[username]/Documents/GitHub/odoo/venv/lib/python3.8/site-packages/werkzeug/wsgi.py",line 766,line 1457,in dispatch
        result = ir_http._dispatch()
      File "/Users/[username]/Documents/GitHub/odoo/addons/web_editor/models/ir_http.py",line 21,in _dispatch
        return super(IrHttp,cls)._dispatch()
      File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_http.py",line 238,in _dispatch
        return cls._handle_exception(e)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_http.py",line 206,in _handle_exception
        return request._handle_exception(exception)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py",line 750,in _handle_exception
        return super(HttpRequest,self)._handle_exception(exception)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py",line 310,in _handle_exception
        raise pycompat.reraise(type(exception),exception,sys.exc_info()[2])
      File "/Users/[username]/Documents/GitHub/odoo/odoo/tools/pycompat.py",line 14,in reraise
        raise value
      File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_http.py",line 234,in _dispatch
        result = request.dispatch()
      File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py",line 809,in dispatch
        r = self._call_function(**self.params)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py",line 350,in _call_function
        return checked_call(self.db,*args,**kwargs)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/service/model.py",line 94,in wrapper
        return f(dbname,**kwargs)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py",line 342,in checked_call
        result.flatten()
      File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py",line 1236,in flatten
        self.response.append(self.render())
      File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py",line 1229,in render
        return env["ir.ui.view"].render_template(self.template,self.qcontext)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_ui_view.py",line 1177,in render_template
        return self.browse(self.get_view_id(template)).render(values,engine)
      File "/Users/[username]/Documents/GitHub/odoo/addons/web_editor/models/ir_ui_view.py",line 27,in render
        return super(IrUiView,self).render(values=values,engine=engine,minimal_qcontext=minimal_qcontext)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_ui_view.py",line 1185,in render
        return self.env[engine].render(self.id,qcontext)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_qweb.py",line 58,in render
        result = super(IrQWeb,self).render(id_or_xml_id,values=values,**context)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/qweb.py",line 260,in render
        self.compile(template,options)(self,body.append,values or {})
      File "<decorator-gen-53>",line 2,in compile
        
      File "/Users/[username]/Documents/GitHub/odoo/odoo/tools/cache.py",line 90,in lookup
        value = d[key] = self.method(*args,**kwargs)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_qweb.py",line 113,in compile
        return super(IrQWeb,self).compile(id_or_xml_id,options=options)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/qweb.py",line 323,in compile
        raise QWebException("Error when compiling AST",e,path,node and etree.tostring(node[0],encoding='unicode'),name)
    odoo.addons.base.models.qweb.QWebException: Name node can't be used with 'None' constant
    Traceback (most recent call last):
      File "/Users/[username]/Documents/GitHub/odoo/odoo/tools/cache.py",line 85,in lookup
        r = d[key]
      File "/Users/[username]/Documents/GitHub/odoo/odoo/tools/func.py",line 69,in wrapper
        return func(self,**kwargs)
      File "/Users/[username]/Documents/GitHub/odoo/odoo/tools/lru.py",line 44,in __getitem__
        a = self.d[obj].me
    KeyError: ('ir.qweb',<function IrQWeb.compile at 0x7f9436306310>,196,('en_US',None,None))
    
    During handling of the above exception,another exception occurred:
    
    Traceback (most recent call last):
      File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/qweb.py",line 315,in compile
        unsafe_eval(compile(astmod,'<template>','exec'),ns)
    ValueError: Name node can't be used with 'None' constant
    
    Error when compiling AST
    ValueError: Name node can't be used with 'None' constant
    Template: web.login
    Path: /t/t/form/input[2]
    Node: <input type="hidden" name="redirect" t-att-value="redirect"/> - - -

我不知道从哪里开始这个错误。我已经查找了web.login模板,却没有找到任何东西。

解决方法

这是Odoo中的错误。它可能以前是沉默的,但是自从最新版本的Python 3.8起,它现在导致崩溃。您可以暂时降级到早期版本(例如python-3.8.3),直到修复Odoo。

更多here

,

这个问题的解决方案是降级你正在运行的python版本。如果假设你在 python3.8 上运行,你应该降级到 python 3.6,正如 Husain Rangwala 在这篇文章 https://www.odoo.com/forum/help-1/valueerror-name-node-can-t-be-used-with-none-constant-template-1105-path-templates-t-t-div-t-t-after-updating-to-python-3-8-5-177836 中解释的那样。要在 Python 版本之间切换,请访问 https://hackersandslackers.com/multiple-versions-python-ubuntu/

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-