I am building a simple api with Flask 0.9 and Python 2.7. I have a serialized object that my program uses that I packed on my computer with cPickle. Now, when trying to open it in my app on PA, I get this import error.
2015-03-12 03:35:18,931 :Exception on / [POST]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1687, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1360, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1358, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1344, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/set2/forest/flask_app.py", line 28, in index
return handle_post()
File "/home/set2/forest/flask_app.py", line 50, in handle_post
dur, dist, steps)
File "/home/set2/forest/flask_app.py", line 79, in calculate_result
forest = cPickle.load(f)
ImportError: No module named copy_reg
I have all of the correct import statements, and I'm not getting any import error. Is there a weird quirk with pickle that makes it not work on PA? I'd really like to get this running.
EDIT: everything works fine on my development machine, and I'm 99% sure that I'm using the same versions of every package.