TypeError: must be str, not set

エラーTypeError

エラーメッセージ

 状態:-  閲覧数:491  投稿日:2017-11-11  更新日:2017-11-11  
TypeError: must be str, not set


遭遇例



修正前
▼index.py
global allExtLinks
allExtLinks = set()
result=[]
for i in range(5):
   getAllExternalLinks("http://oreilly.com")
   result.append("externalLinks: "+allExtLinks)


修正後
▼index.py
global allExtLinks
allExtLinks = set()
result=[]
for i in range(5):
   getAllExternalLinks("http://oreilly.com")
   result.append(allExtLinks)



TypeError: 'dict_keys' object does not support indexing

コメント投稿(ログインが必要)