5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

UUID('…') is not JSON serializable

Last updated at Posted at 2019-09-06
message = json.dumps({
            "function": "function_name",
            "args": [uuid, str, [array], num]
        })

ってやったら、

UUID('…') is not JSON serializable

みたいなエラーが出たので

uuid_str = str(uuid)

message = json.dumps({
            "function": "function_name",
            "args": [uuid_str, str, [array], num]
        })

ってやったらバグらなかった。キレそう。Pythonのuuidクラスは文字列として機能しません。

もんだいなのは

message = json.dumps({
            "function": "function_name",
            "args": [str(uuid), str, [array], num]
})

でもバグるんですよね。はぁ~

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?