2020年03月Archive for

flutter 报错 Could not resolve io.flutter:flutter_embedding_release

 我是升级flutter后,所有项目都报错,先贴解决办法: flutter\packages\flutter_tools\gradle 目录下 aar_init_script.gradle resolve_dependencies.gradle flutter.gradle 以上三个文件中将 http://download.flutter.io 替换为: https://storage.googleapis.com/download.flutter.io   报错如下: flutter build apk The plugin `flutter_forbidshot` is built using an older version of the Android plugin API which assumes that it's running in a full-Flutter environment. It may have undefined behaviors when Flutter is integrated into an e...

flask Jinja2 template 模板 ' 编码问题

flask Jinja2 template 模板 &#39 编码问题 解决办法:  {{ errors|safe }} 或者 {{ errors | tojson | safe }} 推荐第一条

Cython编译 TypeError: func() takes no keyword arguments 深坑

 今天使用Flask写了个接口,本地测试正常,仿到服务器上就报错,而且是特定函数报错.TypeError: func() takes no keyword arguments 一直以为是关键词冲突了. 后来调试半天,最后定位到是cython的问题 下面的方法无效 setup ( name = 'xxxx', ext_modules = cythonize(["src/*.py"], compiler_directives={"always_allow_keywords": True}) ) 最终解决办法,给函数的参数一个默认值即可. # 原来 def func(a,b): pass # 修改后 def func(a=None, b=None): pass

layui 表格 时间戳转换 报错NaN-NaN-NaN NaN:NaN:NaN

 可能是时间戳 秒 和 毫秒之间 计算出现问题. {{layui.util.toDateString(d.site_up_time)}} 修改成: {{layui.util.toDateString(d.site_up_time*1000)}} 字段完整实例 ,{field:'site_up_time', title: '更新时间', templet : "<div>{{layui.util.toDateString(d.site_up_time*1000)}}</div>"}