From 4827d4703c06d9f4f032066c08644ed27761008b Mon Sep 17 00:00:00 2001 From: shimoura Date: Wed, 17 Apr 2024 16:48:32 +0200 Subject: [PATCH 1/2] add except ValueError in VisualCortex_Data.py --- multiarea_model/data_multiarea/VisualCortex_Data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multiarea_model/data_multiarea/VisualCortex_Data.py b/multiarea_model/data_multiarea/VisualCortex_Data.py index d5c866ea..a3c23e4b 100644 --- a/multiarea_model/data_multiarea/VisualCortex_Data.py +++ b/multiarea_model/data_multiarea/VisualCortex_Data.py @@ -1325,7 +1325,7 @@ def probit(x,): out = proc.communicate()[0].decode('utf-8') R_fit = [float(out.split('\n')[1].split(' ')[1]), float(out.split('\n')[1].split(' ')[3])] - except (OSError, IndexError): + except (OSError, IndexError, ValueError): print("No R installation or IndexError, taking hard-coded SLN fit parameters.") R_fit = [-0.1516142, -1.5343200] From e32fd7849b2e2b34112a471787c2c6a64c072ad9 Mon Sep 17 00:00:00 2001 From: shimoura Date: Wed, 17 Apr 2024 16:57:13 +0200 Subject: [PATCH 2/2] ValueError added in error message in VisualCortex_Data.py --- multiarea_model/data_multiarea/VisualCortex_Data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multiarea_model/data_multiarea/VisualCortex_Data.py b/multiarea_model/data_multiarea/VisualCortex_Data.py index a3c23e4b..553839a8 100644 --- a/multiarea_model/data_multiarea/VisualCortex_Data.py +++ b/multiarea_model/data_multiarea/VisualCortex_Data.py @@ -1326,7 +1326,7 @@ def probit(x,): R_fit = [float(out.split('\n')[1].split(' ')[1]), float(out.split('\n')[1].split(' ')[3])] except (OSError, IndexError, ValueError): - print("No R installation or IndexError, taking hard-coded SLN fit parameters.") + print("No R installation or IndexError/ValueError, taking hard-coded SLN fit parameters.") R_fit = [-0.1516142, -1.5343200] """