@@ -116,9 +116,7 @@ def _add_names_to_df(self, log, df):
116116 """
117117 df ["name" ] = "none"
118118 for stratigraphic_id in log .index :
119- df .loc [df ["layerId" ] == stratigraphic_id , "name" ] = log .loc [
120- stratigraphic_id , "name"
121- ]
119+ df .loc [df ["layerId" ] == stratigraphic_id , "name" ] = log .loc [stratigraphic_id , "name" ]
122120
123121 @property
124122 def extents (self ) -> np .ndarray :
@@ -328,10 +326,7 @@ def stratigraphyLocations(self, value: pd.DataFrame):
328326 raise TypeError ("stratigraphyLocations must be set with a pandas dataframe" )
329327 self ._validate_data_frame_columns (
330328 value ,
331- {
332- k : False
333- for k in ["layerId" , "easting" , "northing" , "altitude" , "type" , "name" ]
334- },
329+ {k : False for k in ["layerId" , "easting" , "northing" , "altitude" , "type" , "name" ]},
335330 )
336331 self .__setitem__ ("contacts" , value )
337332
@@ -344,9 +339,7 @@ def stratigraphyOrientations(self) -> pd.DataFrame:
344339 @stratigraphyOrientations .setter
345340 def stratigraphyOrientations (self , value : pd .DataFrame ):
346341 if isinstance (value , pd .DataFrame ) is False :
347- raise TypeError (
348- "stratigraphyOrientations must be set with a pandas dataframe"
349- )
342+ raise TypeError ("stratigraphyOrientations must be set with a pandas dataframe" )
350343 self ._validate_data_frame_columns (
351344 value ,
352345 {
@@ -388,6 +381,13 @@ def __getitem__(self, element):
388381 # TODO: this isn't really ideal and maybe need to be removed but at least it gives an idea of the column
389382 # names needed.
390383 return pd .DataFrame (columns = list (compoundTypeMap [element ].names ))
384+ if (
385+ resp ["errorString" ]
386+ == "No EventLog present in ExtractedInformation for access request"
387+ ):
388+ # TODO: this isn't really ideal and maybe need to be removed but at least it gives an idea of the column
389+ # names needed.
390+ return pd .DataFrame (columns = list (compoundTypeMap [element ].names ))
391391 # return ProjectFileElement(self.project_filename, element).value
392392
393393 def __setitem__ (self , element , value ):
0 commit comments