From cfafafb8fc481ef937ad1e55f40a27c1ee3052a4 Mon Sep 17 00:00:00 2001 From: Avishai Weingarten <33716232+AvishaiW@users.noreply.github.com> Date: Tue, 27 Feb 2018 09:47:02 +0200 Subject: [PATCH 1/2] BUG #252 fixed utc time and file erased --- catalyst/exchange/utils/exchange_utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/catalyst/exchange/utils/exchange_utils.py b/catalyst/exchange/utils/exchange_utils.py index 5c40a26d..658a7002 100644 --- a/catalyst/exchange/utils/exchange_utils.py +++ b/catalyst/exchange/utils/exchange_utils.py @@ -446,12 +446,13 @@ def remove_old_files(algo_name, today, rel_path, environ=None): # run on all files in the folder for f in os.listdir(folder): try: - creation_unix = os.path.getctime(os.path.join(folder, f)) - creation_time = pd.to_datetime(creation_unix, unit='s', ) + file_path = os.path.join(folder, f) + creation_unix = os.path.getctime(file_path) + creation_time = pd.to_datetime(creation_unix, unit='s', utc=True) # if the file is older than 30 days erase it if today - pd.DateOffset(30) > creation_time: - os.unlink(f) + os.unlink(file_path) except OSError: error = 'unable to erase files in {}'.format(folder) From 46e1a87a3def5e27584819f4e3f72b46cf145078 Mon Sep 17 00:00:00 2001 From: Avishai Weingarten <33716232+AvishaiW@users.noreply.github.com> Date: Tue, 27 Feb 2018 18:47:43 +0200 Subject: [PATCH 2/2] DOC: added troubleshooting for python3 --- docs/source/install.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 5c24159f..6ef366b5 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -89,7 +89,7 @@ Once either Conda or MiniConda has been set up you can install Catalyst: .. code-block:: bash - conda env create -f python2.7-environment.yml + conda env create -f python2.7-environment.yml 4. Activate the environment (which you need to do every time you start a new session to run Catalyst): @@ -132,10 +132,19 @@ with the following steps: conda env remove --name catalyst 2. Create the environment: + + for python 2.7: .. code-block:: bash conda create --name catalyst python=2.7 scipy zlib + + or for python 3.6: + + .. code-block:: bash + + conda create --name catalyst python=3.6 scipy zlib + 3. Activate the environment: