title: Python GUI using Kivy. Cannot save figures when running .exe file
body: <p>Using Python and Kivy I have created an interface. When I run the code in Pycharm everything goes smoothly, but when I run the .exe file of the application, the code crashes just before saving some figures.</p>
  <p>In the code, at some point, I create some figures and I save them in one folder (/Results_plots) inside the main folder where the project is located (/main). The figures are saved using:</p>
  <pre><code>plt.savefig(f&quot;Results_plots/Comparison/figure1&quot;)
  </code></pre>
  <p>I have also tried without succeeding:</p>
  <pre><code>basepath=os.path.abspath(str(f&quot;Results_plots/Comparison&quot;))
  
  plt.figure(os.path.join(basepath, f&quot;figure1&quot;))
  </code></pre>
  <p>Extra information that might help:</p>
  <ul>
  <li>I created the exe file by using:</li>
  </ul>
  <pre><code>pyinstaller main_script.py
  </code></pre>
  <p>Then I modify the .spec and I run &quot;pyinstaller main_script.spec&quot;</p>
  <ul>
  <li><p>The main_script.py of the project interconnects with other scripts and reads files from other folders inside the main folder. This seems to work properly when running the .exe file</p>
  </li>
  <li><p>kivy version: v1.11.1</p>
  </li>
  <li><p>python version: Python 3.7.4</p>
  </li>
  <li><p>pyinstaller version: 4.0</p>
  </li>
  <li><p>matplotlib version: 3.1.3</p>
  </li>
  </ul>