pyImageClassification icon indicating copy to clipboard operation
pyImageClassification copied to clipboard

SyntaxError: invalid syntax in featureExtraction.py

Open kvougas opened this issue 8 years ago • 2 comments

Hello, I tried to run the code in featureExtraction.py and I get

File "featureExtraction.py", line 120 print "{0:1f}".format(100.0 * float(i) / len(imageFilesList)) ^ SyntaxError: invalid syntax

What is the problem?

kvougas avatar Nov 24 '17 10:11 kvougas

You are using Python3 while the system is designed on Python2. I recommend you to use Python2 as some libraries such as "pickle" won't get installed on Python3.

shreyas3336 avatar Aug 09 '18 06:08 shreyas3336

Got an error while running "python featureExtraction.py -featuresDir sampledata/spectrograms2/music/" Traceback (most recent call last): File "featureExtraction.py", line 238, in main(sys.argv) File "featureExtraction.py", line 220, in main (FM, Files, FeatureNames) = getFeaturesFromDir(argv[2]) File "featureExtraction.py", line 128, in getFeaturesFromDir return (Features, imageFilesList, Names) UnboundLocalError: local variable 'Names' referenced before assignment

UnboundLocalError: local variable 'Names' referenced before assignment

Das-AnupKumar avatar Jun 13 '21 22:06 Das-AnupKumar