Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in executing WebApp.py #76

Open
StefanoGiu opened this issue Apr 20, 2020 · 1 comment
Open

Error in executing WebApp.py #76

StefanoGiu opened this issue Apr 20, 2020 · 1 comment

Comments

@StefanoGiu
Copy link

root@771c49d71c10:/estgiug/estgiug/home_surveillance/system# python WebApp.py
/usr/local/lib/python2.7/dist-packages/sklearn/lda.py:4: DeprecationWarning: lda.LDA has been moved to discriminant_analysis.LinearDiscriminantAnalysis in 0.17 and will be removed in 0.19
"in 0.17 and will be removed in 0.19", DeprecationWarning)
logging directory already exist
Traceback (most recent call last):
File "WebApp.py", line 38, in
HomeSurveillance = SurveillanceSystem.SurveillanceSystem()
File "/estgiug/estgiug/home_surveillance/system/SurveillanceSystem.py", line 120, in init
self.recogniser = FaceRecogniser.FaceRecogniser()
File "/estgiug/estgiug/home_surveillance/system/FaceRecogniser.py", line 90, in init
(self.le, self.clf) = pickle.load(f) # Loads labels and classifier SVM or GMM
File "/usr/lib/python2.7/pickle.py", line 1378, in load
return Unpickler(file).load()
File "/usr/lib/python2.7/pickle.py", line 858, in load
dispatchkey
File "/usr/lib/python2.7/pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "/usr/lib/python2.7/pickle.py", line 1124, in find_class
import(module)
ImportError: No module named copy_reg

@SimonRijn
Copy link

I fixed it by opening 'home_surveillance/system/classifier.pkl' with notepad++ and covert that to Unix by doing the following steps:

  1. Open the classifier.pkl
  2. Click on search in the menu bar and go to the tab Replace
  3. Find for = \r\n and replace it with = \n
  4. Save the file and run python WebApp.py in your docker container

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants