{"action":"created","issue":{"url":"https://api.github.com/repos/fastai/fastai/issues/1327","repository_url":"https://api.github.com/repos/fastai/fastai","labels_url":"https://api.github.com/repos/fastai/fastai/issues/1327/labels{/name}","comments_url":"https://api.github.com/repos/fastai/fastai/issues/1327/comments","events_url":"https://api.github.com/repos/fastai/fastai/issues/1327/events","html_url":"https://github.com/fastai/fastai/issues/1327","id":390502896,"node_id":"MDU6SXNzdWUzOTA1MDI4OTY=","number":1327,"title":"'WindowsPath' object is not iterable","user":{"login":"find-happiness","id":1595547,"node_id":"MDQ6VXNlcjE1OTU1NDc=","avatar_url":"https://avatars1.githubusercontent.com/u/1595547?v=4","gravatar_id":"","url":"https://api.github.com/users/find-happiness","html_url":"https://github.com/find-happiness","followers_url":"https://api.github.com/users/find-happiness/followers","following_url":"https://api.github.com/users/find-happiness/following{/other_user}","gists_url":"https://api.github.com/users/find-happiness/gists{/gist_id}","starred_url":"https://api.github.com/users/find-happiness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/find-happiness/subscriptions","organizations_url":"https://api.github.com/users/find-happiness/orgs","repos_url":"https://api.github.com/users/find-happiness/repos","events_url":"https://api.github.com/users/find-happiness/events{/privacy}","received_events_url":"https://api.github.com/users/find-happiness/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-13T03:28:43Z","updated_at":"2018-12-13T15:44:32Z","closed_at":"2018-12-13T15:44:32Z","author_association":"NONE","body":"system : window 10\r\nfastai : 1.0.36.post1\r\n\r\nmy code:\r\ninterper =  ClassificationInterpretation.from_learner(learner)\r\ntop_loss,idx =  interper.top_losses()\r\ninterper.plot_top_losses(4,figsize=(15,12))\r\n\r\n\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-39-0fc7e4f07038> in <module>\r\n----> 1 interper.plot_top_losses(4,figsize=(15,12))\r\n\r\nf:\\workspace\\python\\fastai\\fastai\\vision\\learner.py in plot_top_losses(self, k, largest, figsize)\r\n    103         fig.suptitle('prediction/actual/loss/probability', weight='bold', size=14)\r\n    104         for i,idx in enumerate(tl_idx):\r\n--> 105             im,cl = self.data.valid_ds[idx]\r\n    106             cl = int(cl)\r\n    107             im.show(ax=axes.flat[i], title=\r\n\r\nf:\\workspace\\python\\fastai\\fastai\\data_block.py in __getitem__(self, idxs)\r\n    512         # note: labels will be ignored if available in the test dataset\r\n    513         items = self.x.__class__.from_folder(self.path / test_folder)\r\n--> 514         return self.add_test(items.items, label=label)\r\n    515 \r\n    516     @classmethod\r\n\r\nf:\\workspace\\python\\fastai\\fastai\\data_block.py in __getitem__(self, idxs)\r\n     93         self.processor = listify(self.processor)\r\n     94         for p in self.processor: item = p.process_one(item)\r\n---> 95         return item\r\n     96 \r\n     97     def analyze_pred(self, pred: Tensor):\r\n\r\nf:\\workspace\\python\\fastai\\fastai\\data_block.py in new(self, items, processor, **kwargs)\r\n     88         return self\r\n     89 \r\n---> 90     def process_one(self, item, processor=None):\r\n     91         \"Apply `processor` or `self.processor` to `item`.\"\r\n     92         if processor is not None: self.processor = processor\r\n\r\nf:\\workspace\\python\\fastai\\fastai\\vision\\data.py in __init__(self, convert_mode, *args, **kwargs)\r\n    253 \r\n    254         img = PIL.Image.open(file)\r\n--> 255         if max_size is not None and (img.height > max_size or img.width > max_size):\r\n    256             assert isinstance(dest, Path), \"You should provide `dest` Path to save resized image\"\r\n    257             dest_fname = dest / file.name\r\n\r\nf:\\workspace\\python\\fastai\\fastai\\data_block.py in __init__(self, items, path, label_cls, xtra, processor, x, **kwargs)\r\n     47     def process_one(self, item: Any):         return item\r\n     48 \r\n---> 49     def process(self, ds: Collection):        ds.items = array([self.process_one(item) for item in ds.items])\r\n     50 \r\n     51 \r\n\r\nf:\\workspace\\python\\fastai\\fastai\\core.py in array(a, dtype, **kwargs)\r\n    244 \r\n    245 def save_texts(fname: PathOrStr, texts: Collection[str]):\r\n--> 246     \"Save in `fname` the content of `texts`.\"\r\n    247     with open(fname, 'w') as f:\r\n    248         for t in texts: f.write(f'{t}\\n')\r\n\r\nTypeError: 'WindowsPath' object is not iterable"},"comment":{"url":"https://api.github.com/repos/fastai/fastai/issues/comments/447015300","html_url":"https://github.com/fastai/fastai/issues/1327#issuecomment-447015300","issue_url":"https://api.github.com/repos/fastai/fastai/issues/1327","id":447015300,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzAxNTMwMA==","user":{"login":"sgugger","id":35901082,"node_id":"MDQ6VXNlcjM1OTAxMDgy","avatar_url":"https://avatars3.githubusercontent.com/u/35901082?v=4","gravatar_id":"","url":"https://api.github.com/users/sgugger","html_url":"https://github.com/sgugger","followers_url":"https://api.github.com/users/sgugger/followers","following_url":"https://api.github.com/users/sgugger/following{/other_user}","gists_url":"https://api.github.com/users/sgugger/gists{/gist_id}","starred_url":"https://api.github.com/users/sgugger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgugger/subscriptions","organizations_url":"https://api.github.com/users/sgugger/orgs","repos_url":"https://api.github.com/users/sgugger/repos","events_url":"https://api.github.com/users/sgugger/events{/privacy}","received_events_url":"https://api.github.com/users/sgugger/received_events","type":"User","site_admin":false},"created_at":"2018-12-13T15:44:32Z","updated_at":"2018-12-13T15:44:32Z","author_association":"COLLABORATOR","body":"There was a bug with this function due to some changes in the library, but it has been fixed in 1.0.37."}}
{"actor":{"display_login":"sgugger"}}