Commit ba205358 authored by Mark Hymers's avatar Mark Hymers

Fix iohub paths

Signed-off-by: Mark Hymers's avatarMark Hymers <mark.hymers@ynic.york.ac.uk>
parent 035c8b86
From: Mark Hymers <mark.hymers@ynic.york.ac.uk>
Date: Sat, 27 Jul 2019 17:14:50 +0100
Subject: Fix iohub paths
Signed-off-by: Mark Hymers <mark.hymers@ynic.york.ac.uk>
---
psychopy/iohub/client/__init__.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/psychopy/iohub/client/__init__.py b/psychopy/iohub/client/__init__.py
index 3474dc9..9e616a7 100644
--- a/psychopy/iohub/client/__init__.py
+++ b/psychopy/iohub/client/__init__.py
@@ -850,11 +850,10 @@ class ioHubConnection(object):
experiment_info = None
session_info = None
hub_defaults_config = {}
- rootScriptPath = os.path.dirname(sys.argv[0])
- if len(rootScriptPath)<=1:
- rootScriptPath = os.path.abspath(".")
+ from pathlib import Path
+ rootScriptPath = os.path.join(str(Path.home()), '.config', 'iohub')
# >>>>> Load / Create / Update iohub config file.....
- cfpath = os.path.join(IOHUB_DIRECTORY, 'default_config.yaml')
+ cfpath = os.path.join(rootScriptPath, 'default_config.yaml')
with open(cfpath, 'r') as config_file:
hub_defaults_config = yload(config_file, Loader=yLoader)
......@@ -2,3 +2,4 @@
0002-Remove-python3-warning-about-importing-ABCs-from-col.patch
0003-Stop-using-deprecated-pytest-pytest_namespace-featur.patch
0004-Fix-text-failures-with-pyglet-1.4.1.patch
0005-Fix-iohub-paths.patch
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