我尝试使用python(py-postgresql-1.2.1)连接到heroku上的postgres数据库,但出现此错误:
2020-03-10T03:21:42.594933+00:00 app[web.1]: Traceback (most recent call last):
2020-03-10T03:21:42.594965+00:00 app[web.1]: File "server.py", line 13, in <module>
2020-03-10T03:21:42.601681+00:00 app[web.1]: db = postgresql.open('pq://rutqtapxkwmrxi:8a6e86ea8df3ef7b4d917bd5f33c4cfca173fd4eb9c3f0c49f7d8a4c46605aac@ec2-3-230-106-126.compute-1.amazonaws.com:5432/de5b2dktt5klk9')
2020-03-10T03:21:42.606748+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/postgresql/__init__.py", line 94, in open
2020-03-10T03:21:42.606749+00:00 app[web.1]: c.connect()
2020-03-10T03:21:42.606750+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/postgresql/driver/pq3.py", line 2427, in connect
2020-03-10T03:21:42.606750+00:00 app[web.1]: self._establish()
2020-03-10T03:21:42.606750+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/postgresql/driver/pq3.py", line 2559, in _establish
2020-03-10T03:21:42.606755+00:00 app[web.1]: self.version_info = pg_version.normalize(pg_version.split(sv))
2020-03-10T03:21:42.606755+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/postgresql/versionstring.py", line 28, in split
2020-03-10T03:21:42.606756+00:00 app[web.1]: vlist = [int(x or '0') for x in v[:-1]]
2020-03-10T03:21:42.606756+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/postgresql/versionstring.py", line 28, in <listcomp>
2020-03-10T03:21:42.606757+00:00 app[web.1]: vlist = [int(x or '0') for x in v[:-1]]
2020-03-10T03:21:42.606757+00:00 app[web.1]: ValueError: invalid literal for int() with base 10: '2 (Ubuntu 12'
有什么线索吗?