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

Connection fails on linux #101

Closed
Kilill opened this issue Apr 21, 2019 · 2 comments
Closed

Connection fails on linux #101

Kilill opened this issue Apr 21, 2019 · 2 comments

Comments

@Kilill
Copy link

Kilill commented Apr 21, 2019

Ubuntu 16.04.6 LTS
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.

import postgresql
db= postgresql.open("pq://localhost/weather")
Traceback (most recent call last):
File "", line 1, in
File "/home/div/work/weather/db/py/fe/postgresql/init.py", line 92, in open
c.connect()
File "/home/div/work/weather/db/py/fe/postgresql/driver/pq3.py", line 2427, in connect
self._establish()
File "/home/div/work/weather/db/py/fe/postgresql/driver/pq3.py", line 2559, in _establish
self.version_info = pg_version.normalize(pg_version.split(sv))
File "/home/div/work/weather/db/py/fe/postgresql/versionstring.py", line 28, in split
vlist = [int(x or '0') for x in v[:-1]]
File "/home/div/work/weather/db/py/fe/postgresql/versionstring.py", line 28, in
vlist = [int(x or '0') for x in v[:-1]]
ValueError: invalid literal for int() with base 10: '2 (Ubuntu 11'

@jwp
Copy link
Contributor

jwp commented Apr 22, 2019

The debian and ubuntu PostgreSQL packages ship with a modified postgresql version string. I would recommend using a different PostgreSQL package, install from source, or use debian's py-postgresql package accommodating for the modification local to their distribution.

@jwp jwp closed this as completed Apr 22, 2019
@pensnarik
Copy link

Is it possible to adopt is so as the module could be used with any version string? It's ridiculous that I cannot use it only because of this.

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

3 participants