会喜欢这里的一些帮助。完整上下文这是我的第一个“有目的的”Python 脚本。在此之前,我只涉足了一点,老实说还在学习,所以也许我在这里跳得太早了。
长话短说,一直在修复各种类型的不匹配或只是一般的缩进问题(亲爱的大蟒蛇对此并不宽容)。
我想我快完成了,但还有一些最后的问题。他们中的大多数似乎也来自同一部分。这个脚本只是为了获取一个包含 3 列的 csv 文件,并使用它来发送基于第一列(iOS 或 Android)的请求。
这是错误堆栈跟踪:
Reading in file: test.csv
Sending requests! Stand by...
0%| | 0/384 [00:00<?, ?it/s]
Traceback (most recent call last):
File "a_GDPR_delete.py", line 199, in <module>
start()
File "a_GDPR_delete.py", line 191, in start
run( output_name, output_file, testing)
File "a_GDPR_delete.py", line 114, in run
android_request(device[position], timestamp, req_id, android, token, endpoint)
File "a_GDPR_delete.py", line 57, in android_request
body = json.dumps(body)
File "/Users/joseph/anaconda3/lib/python3.6/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/Users/joseph/anaconda3/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/Users/joseph/anaconda3/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/Users/joseph/anaconda3/lib/python3.6/json/encoder.py", line 180, in default
o.__class__.__name__)
TypeError: Object of type 'int64' is not JSON serializable
斯蒂芬大帝
素胚勾勒不出你
相关分类