Bug #1799


Losing data tables when using “Export”

Added by Veronique Connolly about 19 years ago. Updated almost 19 years ago.

morpho - general
Target version:
Start date:
Due date:
% Done:


Estimated time:


I exported a data package (dp) and when I checked the “data” subdirectory
generated from the export, not all the files corresponding to my dp’s data
tables (dt) were there.

I had three dt in my dp, and the 2nd one was one that I had created using the
“Describe” option (New DataTable Wizard/Describe/Automatic). The dt I was
missing after the export was the 3rd one displayed in the dp.

I investigated and created a few dp with varying numbers of dt, always including
a dt created with “Describe” (the other dt were created by automatically
importing a text file) and making sure the “describe” dt was always followed by
at least one dt. After I exported these dp, the dt missing were always the ones
that followed the “describe” dt.

Actions #1

Updated by Saurabh Garg about 19 years ago

Fixed. (Replaced return with continue in the for loop)

Another issue I found with export:
When a datapackage has two data files with same names (for example two files
from different directories having same generic name like 'data'). When the
user exports the datapackage, there will be only one file in the data directory
as morpho export the data with the same filenames as the original file. Hence
after both the files have been written to data directory, there is only one
data file.

Possible solutions:
1. Close this bug and enter this as a new bug to be taken care of in the next
2. Name the data files with there assigned urls. e.g. knb.213.1
3. Create directories with names as assigned urls and save data files in there
seperate directories.
4. Something else that I cannot think of.

Actions #2

Updated by Matt Jones about 19 years ago

Also could try:

5. Check for naming conflict before writing the file, and if a file already
exists withthe same name, append a suffix onto the end of the basename (e.g.,
data.txt renamed to data-1.txt before being exported).

Actions #3

Updated by Saurabh Garg almost 19 years ago

Fixed the bug in last comments using the third suggection - create directories
with names as assigned urls and save data files in there seperate directories

Actions #4

Updated by Saurabh Garg almost 19 years ago

Both I and Veronique tested the fix. It is running fine. Closing the bug.

Actions #5

Updated by Redmine Admin almost 11 years ago

Original Bugzilla ID was 1799


Also available in: Atom PDF