title: Pyinstaller exectuable using data from other folders?
body: <p>I've written a program that generates a random name and displays a random image along with it using Python and tkinter. However, I want the user to be able to add and remove pictures as well as edit the names of students. That being said, I don't want to package these inside the executable where it can't be changed by the user.</p>
  
  <p>To use PyInstaller, I go into the command prompt and navigate to the working directory and type:</p>
  
  <pre><code>pyi-makespec --windowed --onefile --icon=Assets\\icon.ico random_student.py
  </code></pre>
  
  <p>Then, in the spec file I change datas to:</p>
  
  <pre><code>datas=[('Assets\\icon.ico', 'Assets')],
  </code></pre>
  
  <p>Then, I run</p>
  
  <pre><code>pyinstaller random_student.spec
  </code></pre>
  
  <p>The program runs just fine using PyCharm. And I've done this exact same method on a couple of other .py files an it works. However, they don't need to pull images/text into their programs. This will create an executable, but I can't run it. It gives me a Fatal Error "Failed to execute script random_student". I've tried placing the executable in the working directory and in the pictures folder, but neither work. </p>
  
  <p>I'm currently using Windows 10 64-bit and Python 3.6.6</p>
  
  <p>I'd appreciate any kind of help I can get with this!</p>
  
  <p>SOLUTION: I removed the --windowed option so I could actually read the error. Then realized I didn't have Pillow installed so it was unable to be packaged. Thank you for the help.</p>