Unable to run code as a python script from bash

Has anybody tried running their code as a python script? I am getting this error message described in a previous post:

Exception ignored in: <bound method DataLoaderIter.__del__ of <torch.utils.data.dataloader.DataLoaderIter object at 0x7fce2b447e48>>
Traceback (most recent call last):
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 241, in __del__
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 235, in _shutdown_workers
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 521, in set
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 364, in notify_all
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 347, in notify
TypeError: 'NoneType' object is not callable
Exception ignored in: <bound method DataLoaderIter.__del__ of <torch.utils.data.dataloader.DataLoaderIter object at 0x7fce2b447c88>>
Traceback (most recent call last):
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 241, in __del__
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 235, in _shutdown_workers
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 521, in set
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 364, in notify_all
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 347, in notify
TypeError: 'NoneType' object is not callable
Exception ignored in: <bound method DataLoaderIter.__del__ of <torch.utils.data.dataloader.DataLoaderIter object at 0x7fce2b270fd0>>
Traceback (most recent call last):
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 241, in __del__
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 235, in _shutdown_workers
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 521, in set
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 364, in notify_all
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 347, in notify
TypeError: 'NoneType' object is not callable
Exception ignored in: <bound method DataLoaderIter.__del__ of <torch.utils.data.dataloader.DataLoaderIter object at 0x7fce2b22ac18>>
Traceback (most recent call last):
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 241, in __del__
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 235, in _shutdown_workers
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 521, in set
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 364, in notify_all
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 347, in notify
TypeError: 'NoneType' object is not callable

This happens on AWS and locally too, and I have pulled the latest code from the fastai repo.

Have you done a git pull and deleted your tmp folder?

Hi @jeremy,

I’m up to date with this commit

d091f40 Merge pull request #16 from ohmeow/master
c738837 predict_array
9c86d74 predict_dl

I tried deleting my tmp folder too. I also updated to the latest conda packages. I reproduced this problem on a fresh AWS instance with the fastai AMI, so I’m not sure how nobody else has run into this problem. It must be something I did wrong.

I’m not sure anyone else is trying it as a python script - I’ll try to look today if I have a chance.

1 Like

Thanks, I really appreciate your looking into this. I would have tried to spend some more time looking into it but I’m at a bit of a loss at this point. The error message is rather cryptic, and the weird thing is that the exception seems to occur after my code has already run…so I suppose it’s happening in a cleanup process.

In any event, it’s not terribly urgent; I’m perfectly alright working within Jupyter.