title: Pyinstaller "FileNotFoundError: [Errno 2] No such file or directory:" when running app
body: <p>I recently have packaged a python app using the <code>pyinstaller --onefile</code> command. It succesfully makes a executable file that launches fine. I can use pretty much almost all the functions in my script with no problem, except one. When I call a function of another python file (which is in my app folder), I get this error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;socketserver.py&quot;, line 647, in process_request_thread
    File &quot;socketserver.py&quot;, line 357, in finish_request
    File &quot;socketserver.py&quot;, line 717, in __init__
    File &quot;http/server.py&quot;, line 426, in handle
    File &quot;http/server.py&quot;, line 414, in handle_one_request
    File &quot;CaptchaHarvester/harvester/server/__init__.py&quot;, line 134, in do_GET
    File &quot;CaptchaHarvester/harvester/server/__init__.py&quot;, line 178, in handel_request
    File &quot;CaptchaHarvester/harvester/server/__init__.py&quot;, line 85, in _load_template
  FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/rl/rmr5s0ld22j0h_z15m90v0c80000gr/T/_MEIBVnHEv/harvester/server/templates/ga.chunk.html'
  ----------------------------------------
  ----------------------------------------
  Exception happened during processing of request from ('127.0.0.1', 54955)
  Traceback (most recent call last):
    File &quot;socketserver.py&quot;, line 647, in process_request_thread
    File &quot;socketserver.py&quot;, line 357, in finish_request
    File &quot;socketserver.py&quot;, line 717, in __init__
    File &quot;http/server.py&quot;, line 426, in handle
    File &quot;http/server.py&quot;, line 414, in handle_one_request
    File &quot;CaptchaHarvester/harvester/server/__init__.py&quot;, line 122, in do_GET
  FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/rl/rmr5s0ld22j0h_z15m90v0c80000gr/T/_MEIBVnHEv/harvester/server/icon.png'
  </code></pre>
  <p>The problem seems to be that pyinstaller cant properly find the files(icon.png and ga.hunk.html). These files are in a folder that is in the same folder as my main.py file. I was wondering how I can make pyinstaller find these files succesfully? I have tried to add to the datas class in the .spec file, but I still get the error. This is what that line looks like:<code>datas=[('/Users/A/Desktop/ss/CaptchaHarvester/harvester/server/icon.png','/Users/A/Desktop/ss/CaptchaHarvester/harvester/server')],</code>
  Please let me know if I am doing something wrong or if yall have any ideas on how to resolve it.</p>
  <p>I am on macosx catalina and python 3.7 if that is any help.</p>
  <p>Thanks!</p>