pytorch-cifar icon indicating copy to clipboard operation
pytorch-cifar copied to clipboard

ValueEroor

Open wangwei28 opened this issue 4 years ago • 7 comments

Sorry,I'm justly learn pytorch,runnning the code,happen error as follows: please give me some adivice,thank you!

'stty' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� Traceback (most recent call last): File "F:/Python Works/pytorch-cifar10-master/utils.py", line 45, in _, term_width = os.popen('stty size', 'r').read().split() ValueError: not enough values to unpack (expected 2, got 0)

wangwei28 avatar Jul 27 '20 12:07 wangwei28

This is linux code?

wangwei28 avatar Jul 28 '20 09:07 wangwei28

the same,it's maybe python version question

warmingkkk avatar Jul 28 '20 14:07 warmingkkk

这个应该是windows平台的问题,在Linux上不会出现,直接定义term_width就可以了,例如term_width = 200

Dabu9 avatar Dec 16 '21 08:12 Dabu9

Did you guys able to fix it? I also got the same error

jahidhasanlinix avatar Jan 10 '22 23:01 jahidhasanlinix

俺也一样

LiangLiu-ic avatar Jul 15 '22 04:07 LiangLiu-ic

有具体的解决方法吗?

Selfpline6 avatar Mar 21 '23 14:03 Selfpline6

上面的乱码是'stty' 不是内部或外部命令,也不是可运行的程序或批处理文件。,解决方法是下面这个老哥的方法。具体是找到_, term_width = os.popen('stty size', 'r').read().split()这一行,注释掉,然后下面一行的term_width = int(term_width)手动设置成200即可

这个应该是windows平台的问题,在Linux上不会出现,直接定义term_width就可以了,例如term_width = 200

l1chao avatar Mar 06 '24 08:03 l1chao