Hi! I faced with a little bit strange problem for me: after adding the following line
classifier = cPickle.load(open(os.path.join(APP_STATIC,'knn_dc.pck')))
to my code, when I submit a form in gui (and this code executes), I receive the following error into browser:
Forbidden (403)
CSRF verification failed. Request aborted.
Previously I have added these lines to suuport this cPickle.load() function (lib imports successfully, I get csrf error only when I am trying to load my model for machine learning):
import cPickle
APP_ROOT = os.path.dirname(os.path.abspath(__file__))
APP_STATIC = os.path.join(APP_ROOT, 'static')
I disabled csrf in config file, but the error is still here and I have no problems when reading data from txt files with file.open() function.
Could anyone please help to deal with this?