title: I got this error ValueError: not enough values to unpack (expected 2, got 1)
body: <p><strong>Python</strong></p>
  <p>Iam trying to extract frames from UCF-101 dataset, but I got this error:
  ValueError: not enough values to unpack (expected 2, got 1).
  Iam using Anaconda 1.7.2</p>
  <p>This line shows the argument error: sequence_type, sequence_name = video_path.split(&quot;.avi&quot;)[0].split(&quot;/&quot;)[-2:]</p>
  <pre><code>import av
  import glob
  import os
  import time
  import tqdm
  import datetime
  import argparse
  
  
  def extract_frames(video_path):
      frames = []
      video = av.open(video_path)
      for frame in video.decode(0):
          yield frame.to_image()
  
  
  prev_time = time.time()
  if __name__ == &quot;__main__&quot;:
      parser = argparse.ArgumentParser()
      parser.add_argument(&quot;--dataset_path&quot;, type=str, default=&quot;UCF-101&quot;, help=&quot;Path to UCF-101 dataset&quot;)
      opt = parser.parse_args()
      print(opt)
  
      time_left = 0
      video_paths = glob.glob(os.path.join(opt.dataset_path, &quot;*&quot;, &quot;*.avi&quot;))
      for i, video_path in enumerate(video_paths):
          sequence_type, sequence_name = video_path.split(&quot;.avi&quot;)[0].split(&quot;/&quot;)[-2:]
          sequence_path = os.path.join(f&quot;{opt.dataset_path}-frames&quot;, sequence_type, sequence_name)
  
          if os.path.exists(sequence_path):
              continue
  
          os.makedirs(sequence_path, exist_ok=True)
  
          # Extract frames
          for j, frame in enumerate(
              tqdm.tqdm(
                  extract_frames(video_path, time_left),
                  desc=f&quot;[{i}/{len(video_paths)}] {sequence_name} : ETA {time_left}&quot;,
              )
          ):
              frame.save(os.path.join(sequence_path, f&quot;{j}.jpg&quot;))
  
          # Determine approximate time left
          videos_left = len(video_paths) - (i + 1)
          time_left = datetime.timedelta(seconds=videos_left * (time.time() - prev_time))
          prev_time = time.time()
  </code></pre>