windows7环境下,执行代码报ValueError: embedded null byte时,在原代码前面加一行代码:locale.setlocale(locale.LC_ALL,en)即可解决即:locale.setlocale(locale.LC_ALL,en) locale.setlocale(locale.LC_CTYPE,...

windows7环境下,执行代码报ValueError: embedded null byte时,在原代码前面加一行代码:locale.setlocale(locale.LC_ALL,'en')即可解决
即:
locale.setlocale(locale.LC_ALL,'en')
locale.setlocale(locale.LC_CTYPE,'chinese')
ws["C3"]=time.strftime('%Y年%m月%d日 %H时%M分%S秒',time.localtime())
沃梦达教程
本文标题为:windows7,python3使用time.strftime()函数报ValueError: embedded null byte


基础教程推荐
猜你喜欢
- Python基础学习之函数和代码复用详解 2022-09-02
- Centos7下安装python环境 2023-09-04
- CentOS 7.5 安装 Python3.7 2023-09-03
- python的环境conda简介 2022-10-20
- 基于Python实现股票数据分析的可视化 2023-08-04
- Python爬取当网书籍数据并数据可视化展示 2023-08-11
- centos系统 anaconda3(python3)安装pygrib 2023-09-04
- 四步教你学会打包一个新的Python模块 2022-10-20
- Python 中 Elias Delta 编码详情 2023-08-08
- ubuntu 18 python3.6 的安装与 python2的版本切换 2023-09-03