Nupic version installed : 0.5.7
nupic.bundings : 0.4.13
When I run the code it does not create an output and comes back with a random response. from: can’t read /var/mail/subprocess from: can’t read /var/mail/optparse from: can’t read /var/mail/datetime
./scripts/run_nupic_tests.py: 27: Syntax error: “(” unexpected
You may think you are running python 2.7, but I bet you are not. What OS are you using? And do you have multiple versions of python installed? That is usually the problem.
confess I’m a newbie to NuPIC. I’ve watched about 9 of your videos
(nice! btw) and decided to start playing with code to explore more.
My background: DOS C/C++/ASM (no really, I’m that old.) Windows
C/C++/.NET, Linux: C/C++ Ruby, etc. Weak on Python, but when reading it,
it reads like code… LOTs of projects involving interfacing/controlling
HW devices incl. motion control, video processing spectral analysis.
To your questions:
OS:
/$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
=========== pytest-warning summary ============================== WC1 /home/john/numenta/nupic/tests/unit/nupic/engine/network_test.py cannot collect test class ‘TestNode’ because it has a init constructor WC1 /home/john/numenta/nupic/tests/unit/nupic/frameworks/opf/htmpredictionmodel_classifier_helper_test.py cannot collect test class ‘TestOptionParser’ because it has a init constructor WC1 /home/john/numenta/nupic/tests/unit/nupic/regions/knn_anomaly_classifier_region_test.py cannot collect test class ‘TestOptionParser’ because it has a init constructor WC1 /home/john/numenta/nupic/tests/unit/nupic/support/decorators_test.py cannot collect test class ‘TestParentException’ because it has a init constructor WC1 /home/john/numenta/nupic/tests/unit/nupic/support/decorators_test.py cannot collect test class ‘TestChildException’ because it has a init constructor =======710 passed, 17 skipped, 8 xfailed, 5 pytest-warnings in 113.87 seconds=================
When I run python scripts/run_nupic_tests.py I receive this output:
$ python scripts/run_nupic_tests.py
Traceback (most recent call last):
File “scripts/run_nupic_tests.py”, line 262, in
os.chdir(os.getenv(‘NUPIC’))
TypeError: coercing to Unicode: need string or buffer, NoneType found
Looking into it on the forum, it was recommended uninstalling nupic completely and reinstalling it with the --user flag and this didn’t fix it. The bindings are on 1.0.6, but does having nupic on 1.0.5 cause any sort of problems?
I have both python 2 and python 3 installed but I confirmed that by running $python that a python 2 shell opens. So I’m not sure if it’s an issue in my python env.
That error means the NUPIC environment variable wasn’t set, so you have to set it first. This is pretty much standard way to run a python unit test suite.
However, after running $ python scripts/run_nupic_tests.py I still receive the same output.
$ python scripts/run_nupic_tests.py
Traceback (most recent call last):
File “scripts/run_nupic_tests.py”, line 262, in
os.chdir(os.getenv(‘NUPIC’))
TypeError: coercing to Unicode: need string or buffer, NoneType found
Am I misunderstanding how to set the environment variable here? I’m not too familiar with python and its package management.
It ran! Thank you so much! I used your first command:
All the tests are supposed to pass though right? The end summary has some skips, xfails, and warnings:
========================================================================================== pytest-warning summary ==========================================================================================
WC1 /home/flarelink/nupic/tests/unit/nupic/engine/network_test.py cannot collect test class ‘TestNode’ because it has a init constructor
WC1 /home/flarelink/nupic/tests/unit/nupic/frameworks/opf/htmpredictionmodel_classifier_helper_test.py cannot collect test class ‘TestOptionParser’ because it has a init constructor
WC1 /home/flarelink/nupic/tests/unit/nupic/regions/knn_anomaly_classifier_region_test.py cannot collect test class ‘TestOptionParser’ because it has a init constructor
WC1 /home/flarelink/nupic/tests/unit/nupic/support/decorators_test.py cannot collect test class ‘TestParentException’ because it has a init constructor
WC1 /home/flarelink/nupic/tests/unit/nupic/support/decorators_test.py cannot collect test class ‘TestChildException’ because it has a init constructor
================================================================== 715 passed, 17 skipped, 8 xfailed, 5 pytest-warnings in 221.30 seconds ==================================================================
I ran the same command with the -u flag like so: $ NUPIC=pwd python scripts/run_nupic_tests.py -u
Where I still end up with skip, xfails, and warnings:
========================================================================================== pytest-warning summary ==========================================================================================
WC1 /home/flarelink/nupic/tests/unit/nupic/engine/network_test.py cannot collect test class ‘TestNode’ because it has a init constructor
WC1 /home/flarelink/nupic/tests/unit/nupic/frameworks/opf/htmpredictionmodel_classifier_helper_test.py cannot collect test class ‘TestOptionParser’ because it has a init constructor
WC1 /home/flarelink/nupic/tests/unit/nupic/regions/knn_anomaly_classifier_region_test.py cannot collect test class ‘TestOptionParser’ because it has a init constructor
WC1 /home/flarelink/nupic/tests/unit/nupic/support/decorators_test.py cannot collect test class ‘TestParentException’ because it has a init constructor
WC1 /home/flarelink/nupic/tests/unit/nupic/support/decorators_test.py cannot collect test class ‘TestChildException’ because it has a init constructor
================================================================== 713 passed, 17 skipped, 8 xfailed, 5 pytest-warnings in 207.14 seconds ==================================================================