nickmckay / LiPD-utilities

Input/output and manipulation utilities for LiPD files in Matlab, R and Python
http://nickmckay.github.io/LiPD-utilities/
GNU General Public License v2.0
29 stars 9 forks source link

Python: ExtractTs no longer working #72

Closed michaelerb closed 4 years ago

michaelerb commented 4 years ago

With the recent update, ExtractTs is no longer working for me. I get the following error:

extracting paleoData... Error: Unable to extractTs: name 'start' is not defined

The error appears to be because the variable "start" is never defined in the code, but the code tries to use it as an input for the "extract" function. Formerly, "start" was defined using the clock function, but that line was removed in the most recent update. Please fix.

michaelerb commented 4 years ago

For a quick fix, I added the line "start = clock()" back to the beginning of ExtractTs on my local copy of init.py. Is this an adequate fix? I'm not entirely sure what the "start" variable is used for.

chrismheiser commented 4 years ago

Hi Michael,

Sorry you had to deal with this bug. It's since been fixed (officially) in an update if you install the most recent LiPD package 0.2.8.1. You were correct to add that line back in. I use that as the timestamp for identifying new Time Series, and mistakenly removed it.