Drkcore

19 09 2013 Python Tweet

TypeError: must be string or read-only character buffer, not instancemethod

pythonのSOAPクライアントであるsudsを使ってSOAPしていたら、返ってくるデータが巨大すぎて、ファイルに吐いて眺めたくなったので

with open(file, "w") as f:
  f.write(soap_result)

をしたら表題のエラーが出た。

with open(file, "w") as f:
  f.write(str(soap_result))

ってやらないといけなかった。

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021