track_memory.py: TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Meliae |
Incomplete
|
Medium
|
Unassigned |
Bug Description
* Python 2.7.1
* Meliae 0.3.0
For completeness, I'll show the complete run, including output of the command I'm testing:
$ track_memory.py ./build-models.py
spawning: ['./build-
Building sorted file list for doc_*
build_file_list doc/min: 1698076.950773
Building dictionary and corpus
120.451s 286.8MB 286.8MB 30398.8MB*s
243.904s 420.5MB 420.5MB 74471.0MB*s
554.136s 1034.7Dictionar
build_dict_corpus doc/min: 19094.502591
INFO:utils:saving Dictionary object to doc__dic
Building Tf-Idf for corpus
build_tfidf doc/min: 3656978.134640
INFO:utils:saving TfidfModel object to doc__tfidf
Building term-document matrix for corpus
614.389s 1303.5MB 1303.5MB 354046.
INFO:utils:saving SparseMatrixSim
Loading file list
Loading dictionary
INFO:utils:loading Dictionary object from doc__dic
Loading corpus
Loading corpus_map
Loading SMS
INFO:utils:loading SparseMatrixSim
Loading Tf-Idf object
INFO:utils:loading TfidfModel object from doc__tfidf
Removing previous similarityfile
Calculating similarities
Getting similarities against data/doc_131669
rebuild_
==== INFO ===
The following tokens are skipped. they are probably stopwords or words which only occur once:
['een', 'van', 'de', 'van', 'de', 'in', 'met', 'het', 'posttraumatisch', 'een', 'van', 'de', 'van', 'de', 'van']
Traceback (most recent call last):.4MB*s
File "/usr/bin/
sys.
File "/usr/bin/
spawn_
File "/usr/bin/
cur_mem*mb, peak_mem*mb, mem_secs*mb)
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...
> File "/usr/bin/ meliae- track_memory. py", line 47, in spawn_and_track
> cur_mem*mb, peak_mem*mb, mem_secs*mb)
> TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
It looks like something in there was still 'None', which is a bit
surprising. I wish it was easier to detect which variable it was.
I wonder if something exited early, or maybe on your system I'm not
detecting one of the strings correctly.
status: incomplete
importance: medium
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk1 uZ18ACgkQJdeBCY SNAAPHWgCeJ8Rft zLREFgo3iTYy0i1 NxKZ qDaRmHbdn/ KpJr91nWR8of
0fMAoMw7m+
=ZgMC
-----END PGP SIGNATURE-----