Descriptor '__subclasses__' of 'type' object needs an argument

username: KanZa
cooked: <p>Hi,<br>
Kindly help me resolve this problem<br>
descriptor ‘<strong>subclasses</strong>’ of ‘type’ object needs an argument</p>
<p>I am importing some libraries on jupyter</p>

username: ptrblck
cooked: <p>Is this issue caused by an import of a PyTorch module? If so, could you please post the lines of code showing the imports and, if possible, a minimal code snippet to reproduce this issue?</p>

username: KanZa
cooked: <p>Thank you so much for your reply. Following are my imports and I am trying to implement this code <a href="https://github.com/tjmoon0104/pytorch-tiny-imagenet" class="inline-onebox" rel="noopener nofollow ugc">GitHub - tjmoon0104/pytorch-tiny-imagenet: pytorch-tiny-imagenet</a> for ResNet18_64</p>
<p>import torch, os<br>
import torch.nn as nn<br>
import torch.optim as optim<br>
import torchvision.datasets as datasets<br>
import torch.utils.data as data<br>
import torchvision.transforms as transforms<br>
import torchvision.models as models<br>
from train_model import train_model<br>
from test_model import test_model<br>
%matplotlib inline</p>

username: ptrblck
cooked: <p>None of these imports raises the error, when I execute them (and copy the missing definitions) in my setup.<br>
Did you verify that these imports are causing the issue?</p>

username: KanZa
cooked: <p>Thank you so much for your reply, kindly check the attached screenshots</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/2/0/2079235ad30244add71eae5a2e5d85e9473b8b2b.png" data-download-href="https://discuss.pytorch.org/uploads/default/2079235ad30244add71eae5a2e5d85e9473b8b2b" title="1"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/2/0/2079235ad30244add71eae5a2e5d85e9473b8b2b_2_554x500.png" alt="1" data-base62-sha1="4DgOBEp9wzvjrCURWvxQNFJdr0T" width="554" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/2/0/2079235ad30244add71eae5a2e5d85e9473b8b2b_2_554x500.png, https://discuss.pytorch.org/uploads/default/optimized/3X/2/0/2079235ad30244add71eae5a2e5d85e9473b8b2b_2_831x750.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/2/0/2079235ad30244add71eae5a2e5d85e9473b8b2b.png 2x" data-dominant-color="F5F6F5"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">1</span><span class="informations">841×758 100 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/b/8/b87b1159117ef14edc5a7746d16baab8a60fd366.png" data-download-href="https://discuss.pytorch.org/uploads/default/b87b1159117ef14edc5a7746d16baab8a60fd366" title="2"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/b/8/b87b1159117ef14edc5a7746d16baab8a60fd366_2_474x500.png" alt="2" data-base62-sha1="qjZwC4A6ff39Ebyi2yMaCtP5Qfc" width="474" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/b/8/b87b1159117ef14edc5a7746d16baab8a60fd366_2_474x500.png, https://discuss.pytorch.org/uploads/default/optimized/3X/b/8/b87b1159117ef14edc5a7746d16baab8a60fd366_2_711x750.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/b/8/b87b1159117ef14edc5a7746d16baab8a60fd366.png 2x" data-dominant-color="F7F7F7"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">2</span><span class="informations">771×812 111 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

username: ptrblck
cooked: <p>Thanks for the update. It seems the error is raised in the <code>livelossplot</code> package, so you could create an issue in their repository.<br>
Based on <a href="https://github.com/python/typing/issues/266">this issue in <code>typing</code></a> it seems that newer Python versions would fix this issue (or you could also try to update <code>typing</code>).</p>