QATM_pytorch icon indicating copy to clipboard operation
QATM_pytorch copied to clipboard

TypeError: pic should be PIL Image or ndarray. Got <class 'NoneType'>

Open jessychen1016 opened this issue 5 years ago • 2 comments

Dear authors, Really appreciate your wonderful contributions, but unfortunately, I did encounter some problem while I am trying to use the project. When I tried to match my own template with my own sample picture, I get this error: "TypeError: pic should be PIL Image or ndarray. Got <class 'NoneType'>". Are there any formatting problems that might cause this issue? Thank you so much

jessychen1016 avatar Feb 08 '20 10:02 jessychen1016

I am also facing the same problem . Were you able to resolve that ?

mhm930 avatar Jun 11 '20 10:06 mhm930

Running the demo on Google Colab gave me a similar error. Turns out the path of an unrelated file (.ipynb_checkpoints in this instance) was getting inserted into the template_path list.

Capture

Once I removed that element from the list (see commented line), it worked correctly. I suspect printing the results of dataset.template_path will give you some insight.

TrInsanity avatar Jul 20 '20 17:07 TrInsanity