title: I’m trying to generate a standalone exe file from multiple python files and additional files (image, excel spreadsheet)
body: <p>I'm quite new to programming with Python so I might be missing something quite obvious here. </p>
  
  <p>I've done a small program in Python which runs ok, but I wanted to share it with my colleagues so I thought of doing a standalone version of it, I've tried using Pyinstaller as it seems the easiest and more straightforward to use, but the exe file generated doesn't seem to work so far.</p>
  
  <p>So I have my program divided in a main file called "main.py" and 3 extra functions that I import in main from other python files in the same folder. It uses one excel spreadsheet and one .ico image for the logo in tkinter.</p>
  
  <p>My first try has been using just the command:</p>
  
  <pre><code>pyinstaller main.py
  </code></pre>
  
  <p>It generates the exe file, but when executing it it just opens a black window and nothing else happens.</p>
  
  <p>I was reading the documentation for pyinstaller and thought I might need to add the other python files too and the extra files. For the excel and the image I didn't manage to understand how I need to write it, I tried to add the following as options, but it gave me back an error</p>
  
  <pre><code>--add-data &lt;logo.ico&gt; --add-data &lt;WAE_SW_NameCnvtn.xlsx&gt;
  </code></pre>
  
  <p>Without those, I managed to generate again the exe file using the following command:</p>
  
  <pre><code>pyinstaller --windowed --name=NameCnvtn main.py read_description.py read_quantity.py word_finder.py
  </code></pre>
  
  <p>This seemed to add quite a few more files to the dist folder, and when I execute the exe file instead of the black window it says "failed to execute the script main", which I assume referes to my main.py file.</p>
  
  <p>In case it helps, I developed it using python 3.6.4 and it uses tkinter and openpyxl. </p>
  
  <p>Thanks for the help.</p>