File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
"""Method to translate a Model to a VisualizationSet."""
2
2
import os
3
+ import pathlib
3
4
import json
4
5
5
6
from ladybug_geometry .geometry3d import Point3D , Face3D
@@ -510,9 +511,14 @@ def _read_sensor_grid_result(result_folder):
510
511
result_file = os .path .join (result_folder , f )
511
512
break
512
513
if result_file is not None :
514
+ print (f'Loading results for { grid_id } with { sensor_count } sensors. Starting from line { st_ln } .' )
513
515
with open (result_file ) as inf :
514
516
for _ in range (st_ln ):
515
517
next (inf )
516
518
for _ in range (sensor_count ):
517
- results .append (float (next (inf )))
519
+ try :
520
+ results .append (float (next (inf )))
521
+ except StopIteration :
522
+ content = pathlib .Path (result_file ).read_text ()
523
+ raise ValueError (f'Failed to load the results. Here is the content of the file: { content } ' )
518
524
return results
You can’t perform that action at this time.
0 commit comments