小编slo*_*ant的帖子

包含dict,text,datetime和ints的JSON转储大列表给出"TypeError:'str'不支持缓冲区接口"

在Windows 7 64位上使用Python 3.2 64位.

f = open("raw_data/results.json", "wb")
json.dump(dictio, f)
f.close()
Run Code Online (Sandbox Code Playgroud)

给出错误:

Traceback (most recent call last):
  File ".\calc_stats_friendly_data.py", line 22, in <module>
    main()
  File ".\calc_stats_friendly_data.py", line 18, in main
    json.dump(races, f)
  File "C:\Python32\lib\json\__init__.py", line 179, in dump
    fp.write(chunk)
TypeError: 'str' does not support the buffer interface
Run Code Online (Sandbox Code Playgroud)

我不知道出了什么问题.使用泡菜工作正常!但我必须使用JSON ...找到问题的提示?名单很大.用pickle保存它需要56 MB.

python string json typeerror

6
推荐指数
1
解决办法
2517
查看次数

什么是用C#编写的3D游戏?

我一直在Google上搜索一些C#程序.我找到了Paint.NET.这是唯一的C#程序吗?游戏怎么样?有人在C#中有3D游戏的链接吗?

c# 3d

2
推荐指数
2
解决办法
1万
查看次数

标签 统计

3d ×1

c# ×1

json ×1

python ×1

string ×1

typeerror ×1