yangze0930 / NTS-Net

This is a PyTorch implementation of the ECCV2018 paper "Learning to Navigate for Fine-grained Classification" (Ze Yang, Tiange Luo, Dong Wang, Zhiqiang Hu, Jun Gao, Liwei Wang).
MIT License
450 stars 118 forks source link

stty: 'standard input': Inappropriate ioctl for device #11

Closed ray-lee-94 closed 5 years ago

ray-lee-94 commented 5 years ago

_, term_width =os.popen('stty size','r').read().split() ValueError: not enough values to unpack

ray-lee-94 commented 5 years ago

sorry. I run the train.py in pycharm, I got this issue. If i run in the Terminal, i is fine.

fxle commented 5 years ago

Hello,I also have this problem. Have you solved it now? @VCBE123

tectal commented 5 years ago

me, too. How to solve it???

franroldans commented 5 years ago

I solved it replacing

_, term_width =os.popen('stty size','r').read().split()

with

from shutil import get_terminal_size
term_width, _ = get_terminal_size()
JingyunLiang commented 5 years ago

You could comment these two lines and use term_width=80.

ZQSIAT commented 3 years ago

I solved it replacing

_, term_width =os.popen('stty size','r').read().split()

with

from shutil import get_terminal_size
term_width, _ = get_terminal_size()

It works!