# Export application problem especially when include csv library in processing.py

**URL:** https://discourse.processing.org/t/export-application-problem-especially-when-include-csv-library-in-processing-py/13920
**Category:** Processing.py
**Created:** [September 11, 2019, 8:28am UTC](https://discourse.processing.org/t/export-application-problem-especially-when-include-csv-library-in-processing-py/13920 "2019-09-11T08:28:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rumidita](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rumidita/32/6042_2.png) [@rumidita](https://discourse.processing.org/u/rumidita)
#### Post date: [September 11, 2019, 8:28am UTC](https://discourse.processing.org/t/export-application-problem-especially-when-include-csv-library-in-processing-py/13920/1 "2019-09-11T08:28:50Z")

</div>

Hello everyone, I have a problem when trying to export the program especially if it contains CSV library in Processing.py.

If I don’t tick the option for “Embed Java for Windows (64-bit)”, it successful to be exported. But, when I try to run the application, it opens for a short moment, then it is closed automatically. I don’t face such kind of this problem when I don’t include the CSV library.

If I tick the option for “Embed Java for Windows (64-bit)”, it gives error statement: ‘Export to windows64 failed’. This problem happens to any kind of file I want to export.

I guess there is something with this CSV library. Though it is also something wrong in my setup because I still failed to embed Java for any program.

I already put the folder of processing to `C:\` directory, as I found in some discussion it might be one of the cause.

I use windows 10 64bit, Processing 3.5.3, with Java 8 installed.

Here is the program that I tried to export:

```auto
import csv
size(500,800)
fill(0)
fileName = 'csv_data.csv'

with open(fileName, 'rt') as csv_file:
    csv_reader = csv.reader(csv_file)
    line_count = 0
    for row in csv_reader:
        if line_count == 0:
            text('Column names are ' +(", ".join(row)),10,30)
            line_count += 1
        else:
            text('Data for ' + row[0] + ' is ' + row[1],10,(line_count+1)*30)
            line_count += 1 

```

And this is the sample of the CSV file:

```auto
timestamp,data
2016/07/04 0:00,50
2016/07/04 1:00,70
2016/07/04 2:00,40
2016/07/04 3:00,65
2016/07/04 4:00,43
2016/07/04 5:00,32
....

```

Hope someone can help 🙏🏻

---

<div class="post-metadata">

### Author: ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)
#### Post date: [September 11, 2019, 9:50am UTC](https://discourse.processing.org/t/export-application-problem-especially-when-include-csv-library-in-processing-py/13920/2 "2019-09-11T09:50:22Z")

</div>

Have you tried copying the CSV file to the _application.windows32_ sub-folder within the sketch folder?  
(sketch\_name\application.windows32\csv\_data.csv)

Despite the ‘Export to windows64 failed’, the .exe within the _application.windows32_ folder should run fine.

---

<div class="post-metadata">

### Author: ![rumidita](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rumidita/32/6042_2.png) [@rumidita](https://discourse.processing.org/u/rumidita)
#### Post date: [September 12, 2019, 7:02am UTC](https://discourse.processing.org/t/export-application-problem-especially-when-include-csv-library-in-processing-py/13920/3 "2019-09-12T07:02:58Z")

</div>

Hi, I tried your suggestion,

> [@tabreturn](#):
>
> copying the CSV file to the _application.windows32_ sub-folder within the sketch folder

then it works very fine. Thanks 🙂

However, by using this way, it will be very messy if I have so many CSV files. 🤔  
It should be some way to define the directory where the files are stored.

---

<div class="post-metadata">

### Author: ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)
#### Post date: [September 12, 2019, 7:17am UTC](https://discourse.processing.org/t/export-application-problem-especially-when-include-csv-library-in-processing-py/13920/4 "2019-09-12T07:17:16Z")

</div>

Sure – you can use a folder named “data”.  
(sketch\_name\application.windows32\data\csv\_data.csv)

---

<div class="post-metadata">

### Author: ![rumidita](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rumidita/32/6042_2.png) [@rumidita](https://discourse.processing.org/u/rumidita)
#### Post date: [September 12, 2019, 7:48am UTC](https://discourse.processing.org/t/export-application-problem-especially-when-include-csv-library-in-processing-py/13920/5 "2019-09-12T07:48:47Z")

</div>

Sorry, I forgot to mention that when the application close automatically (my first problem), all CSV data are stored in the folder named “data” which is automatically created when I exported the application.

> [@tabreturn](#):
>
> sketch\_name\application.windows32\data\csv\_data.csv

So, I still confused about how to handle this. Because when I put the CSV data together in the same directory with the \*.exe file (as you suggested), it is no problem. 😿
