title: Pyinstaller: Images fail to extract
body: <p>I run the build command and everything appears to build correctly until I try to launch the exe and this message pops up:</p>
  
  <p><img src="https://i.stack.imgur.com/S8NTQ.png" alt="Image"></p>
  
  <p>Here is my spec file, I am not sure why it appears to be combing the file path with both images.</p>
  
  <pre><code>block_cipher = None
  
  a = Analysis(['TripCalc.py'],
           pathex=['C:\\Users\\test\\Downloads\\TripApp'],
           binaries=[],
           datas=[('C:\\Users\\test\\Downloads\\TripApp\\BennySM.ico', 'C:\\Users\\test\\Downloads\\TripApp\\BgSM.gif')],
           hiddenimports=[],
           hookspath=[],
           runtime_hooks=[],
           excludes=[],
           win_no_prefer_redirects=False,
           win_private_assemblies=False,
           cipher=block_cipher)
  pyz = PYZ(a.pure, a.zipped_data,
           cipher=block_cipher)
  exe = EXE(pyz,
        a.scripts,
        a.binaries,
        a.zipfiles,
        a.datas,
        name='TripCalc',
        debug=False,
        strip=False,
        upx=True,
        console=False , 
  icon='C:\\Users\\test\\Downloads\\TripApp\\Benny.ico')
  </code></pre>
  
  <p>I tried adding the files beside datas:  </p>
  
  <pre><code>('Benny.ico', 'C:\\Users\\test\\Downloads\\TripApp\\BennySM.ico', 'data', 'BgSM.gif', 'C:\\Users\\test\\Downloads\\TripApp\\BgSM.gif', 'data')
  </code></pre>
  
  <p>But it would not build with the <code>ValueError: too many values to unpack (expected 2)</code>. </p>
  
  <p>I followed the example from this post on how to add the file path to the main python file. <a href="https://stackoverflow.com/questions/7674790/bundling-data-files-with-pyinstaller-onefile">Bundling data files with PyInstaller --onefile</a></p>
  
  <p>I am able to build the exe and run it with the images commented out. Any help would be much appreciated.</p>
  
  <p>When I get the Value Error message I setup the spec file with the following:</p>
  
  <pre><code>block_cipher = None
  
  a = Analysis(['TripCalc.py'],
           pathex=['C:\\Users\\test\\Downloads\\TripApp'],
           binaries=[],
           datas=[('Benny.ico','C:\\Users\\test\\Downloads\\TripApp\\BennySM.ico','data','BgSM.gif','C:\\Users\\test\\Downloads\\TripApp\\BgSM.gif','data')],
           hiddenimports=[],
           hookspath=[],
           runtime_hooks=[],
           excludes=[],
           win_no_prefer_redirects=False,
           win_private_assemblies=False,
           cipher=block_cipher)
  pyz = PYZ(a.pure, a.zipped_data,
           cipher=block_cipher)
  exe = EXE(pyz,
        a.scripts,
        a.binaries,
        a.zipfiles,
        a.datas,
        name='TripCalc',
        debug=False,
        strip=False,
        upx=True,
        console=False , 
  icon='C:\\Users\\test\\Downloads\\TripApp\\Benny.ico')
  </code></pre>
  
  <p>Error window</p>
  
  <p><img src="https://i.stack.imgur.com/R0ohH.png" alt="Build -Value Error"></p>
  
  <p>With those changes to the spec file everything builds but the <a href="https://i.stack.imgur.com/qHFSs.png" rel="nofollow noreferrer">failed to launch script pops</a> up when launching the exe. If they got packed with the exe they should be locationed in the temp file in app data correct?</p>
  
  <p>Thanks!</p>