EscVM / OIDv4_ToolKit

Download and visualize single or multiple classes from the huge Open Images v4 dataset
GNU General Public License v3.0
800 stars 633 forks source link

ValueError: not enough values to unpack (expected 2, got 0) #36

Closed rahulroxx closed 5 years ago

rahulroxx commented 5 years ago

While downloading the images on windows machine it is throwing the below traceback:

Traceback (most recent call last):
  File "main.py", line 36, in <module>
    bounding_boxes_images(args, DEFAULT_OID_DIR)
  File "E:\python\experiment\OIDv4_ToolKit\modules\bounding_boxes.py", line 87, in bounding_boxes_images
    download(args, df_val, folder[i], dataset_dir, class_name, class_code)
  File "E:\python\experiment\OIDv4_ToolKit\modules\downloader.py", line 21, in download
    rows, columns = os.popen('stty size', 'r').read().split()
ValueError: not enough values to unpack (expected 2, got 0)
keldrom commented 5 years ago

@rahulroxx that command is used to know the terminal size. Have you use the command prompt?

keldrom commented 5 years ago

meanwhile I solve the problem substitute the line rows, columns = os.popen('stty size', 'r').read().split() with try: columns, rows = os.get_terminal_size(0) except OSError: columns, rows = os.get_terminal_size(1)

rahulroxx commented 5 years ago

Yup sure, thanks for prompt response @keldrom

rahulroxx commented 5 years ago

I have like 4 classes in

classes-new.txt

Chair
Sofa
Dining_table
television
keldrom commented 5 years ago

I think I'm done. Download the new version of downloader.py and check. If all works close this issue.

rahulroxx commented 5 years ago

Sure thanks for your support 👍