TypeError: must be str, not set

エラーTypeError

エラーメッセージ

 状態:-  閲覧数:506  投稿日: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

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



週間人気ページランキング / 7-10 → 7-16
順位 ページタイトル抜粋 アクセス数
1 NameError: name 're' is not defined | エラー 1
1 urllib.error.HTTPError: HTTP Error 403: Forbidden | エラー 1
1 AttributeError: module 'sys' has no attribute 'setdefaultencoding' | AttributeError(エラー) 1
2025/7/17 1:01 更新