Commit d9df7b0c authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed issue #90 (pandas.errors.ParserError: Expected 2 fields in line 31, saw 3)

Re-enabled testing out output writers.
Updated version info (0.14.3).
parent 95bf39af
......@@ -947,12 +947,12 @@ class GMS_object(object):
paths_inLogs = [GMS_obj.pathGen.get_path_logfile() for GMS_obj in list_GMS_objs]
allLogs_df = DataFrame()
for log in paths_inLogs:
df = read_csv(log, sep='\n', delimiter=': ', header=None,
df = read_csv(log, sep='\n', delimiter=None, header=None, # no delimiter needed
engine='python') # engine suppresses a pandas warning
# FIXME this will log e.g. atm. corr 3 times for S2A -> use captured streams instead?
allLogs_df = allLogs_df.append(df)
allLogs_df = allLogs_df.sort_values(0)
allLogs_df = allLogs_df.sort_values(0) # sorting uses timestamps that appear on first position in logs
allLogs_df = allLogs_df.drop_duplicates() # otherwise, e.g., logs from AC would appear 3 times for S2A
# set common metadata, needed for logfile
GMS_obj_merged.baseN = list_GMS_objs[0].pathGen.get_baseN(merged_subsystems=True)
......@@ -960,7 +960,7 @@ class GMS_object(object):
GMS_obj_merged.scene_ID = list_GMS_objs[0].scene_ID
# write the merged logfile and flush previous logger
np.savetxt(GMS_obj_merged.path_logfile, np.array(allLogs_df), delimiter=': ', fmt="%s")
np.savetxt(GMS_obj_merged.path_logfile, np.array(allLogs_df), delimiter=None, fmt="%s")
GMS_obj_merged.close_loggers()
# log
......
__version__ = '0.14.2'
__versionalias__ = '20180315.03'
__version__ = '0.14.3'
__versionalias__ = '20180315.04'
......@@ -65,7 +65,10 @@ gmsRepo_rootpath = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')
# Defining the configurations needed to start a job containing the different dataset scenes.
# TODO Change the job-configurations for selected datasets.
job_config_kwargs = dict(parallelization_level='scenes', db_host=db_host, spatial_index_server_host=index_host,
delete_old_output=True, is_test=True)
delete_old_output=True, is_test=True,
inmem_serialization=False,
exec_L1AP=[True, True, True], exec_L1BP=[True, True, True], exec_L1CP=[True, True, True],
exec_L2AP=[True, True, True], exec_L2BP=[True, True, False], exec_L2CP=[True, True,False])
##########################
# Test case: BaseTestCases
......@@ -520,8 +523,9 @@ class Test_in_normal_mode(unittest.TestCase):
# self.job_id = 26187053 # GMS41: AC: The input 'list_GMS_objs' contains duplicates: ['', '']
# self.job_id = 26187750 # GEOMS: [AC]: RuntimeWarning: All-NaN slice encountered
# self.job_id = 26187760 # GEOMS: [L2C]: ValueError: 'axis' entry is out of bounds
self.job_id = 26187804 # GEOMS: Spatial homogenization leaves resampling artifacs at the image edges.
# self.job_id = 26187804 # GEOMS: Spatial homogenization leaves resampling artifacs at the image edges.
# self.job_id = 26187922 # GEOMS: AssertionError (self.job_id = 26187922 # GEOMS: AssertionError)
self.job_id = 26188163 # GEOMS: pandas.errors.ParserError: Expected 2 fields in line 31, saw 3
self.PC = process_controller(self.job_id, **dict(is_test=False, parallelization_level='scenes', db_host=db_host,
delete_old_output=True, disable_exception_handler=True))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment