Oulu-IMEDS / solt

Streaming over lightweight data transformations
https://oulu-imeds.github.io/solt/
MIT License
263 stars 19 forks source link

NameError: name 'ktps' is not defined #73

Closed tobimichigan closed 4 years ago

tobimichigan commented 4 years ago

While testing one of the notebook algorithm, this error occured: kpts = None for annotation_fname in glob.glob(os.path.join('Data', 'helen_annotations', '*.txt')): with open(annotation_fname) as f: if f.readline()[:-1] == fname.split('.')[0]: ktps = [] for l in f: tmp = l.split() ktps.append([float(tmp[0]), float(tmp[2])]) break kpts = np.array(ktps)

Specific Error:

NameError Traceback (most recent call last)

in 8 ktps.append([float(tmp[0]), float(tmp[2])]) 9 break ---> 10 kpts = np.array(ktps) NameError: name 'ktps' is not defined
lext commented 4 years ago

Can you show a better formatted code snippet? I can't see the issue otherwise.

The examples should run given you have the data well placed an the latest stable version of SOLT. We did not test the examples in the master branch just yet, and are now working a lot on improving the core of the library.

tobimichigan commented 4 years ago

here u go: Screenshot_2020-06-02 Helen_faces - Jupyter Notebook

soupault commented 4 years ago

@tobimichigan the issue does no seem to be related to solt in any way. Check the if condition in the code - if it is not executed, ktps is not defined, thus, the issue.