1

スクリプトを実行しようとすると、このエラーが発生します。

TypeError: 'builtin_function_or_method' object has no attribute '__getitem__'

スクリプトは次のとおりです。

containerFile = open((tmpImageDirectory+"container.rvbr"), "r")
containedString = containerFile.read()
containerFile.close()
containedFiles = containedString .partition[","]

container.rvbr には、複数のカンマを含む文字列が含まれています。これstr(conatinedString)を実行すると、これが得られる<type 'str'>ので、文字列です.誰かがこれを説明できるのだろうか.

4

2 に答える 2