I am running a Python (2.7.10) Tornado (4.3) webserver that communicates with a hosted Postgres instance using Momoko (2.2.2) based on psycopg2 (2.6.1). My implementation works perfectly locally on my MAC (OSX 10.11.1), but when I push to a hosted Ubuntu (14.04.3) I get an ImportError. For example.py containing
$ python example.py
Traceback (most recent call last):
File "example.py", line 1, in
File "/usr/local/lib/python2.7/dist-packages/momoko/__init__.py", line 14, in
from .connection import Pool, Connection, connect
File "/usr/local/lib/python2.7/dist-packages/momoko/connection.py", line 28, in
from psycopg2.extras import register_json as _psy_register_json
ImportError: cannot import name register_json
I've looked for some basic "import traps" but can't seem to find a solution. Any ideas what could be causing this?
Thanks so much folks!