Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import psycopg2
- conn = psycopg2.connect(dbname = 'gis02', host= '127.0.0.1', user = 'gis2user',password= '123456')
- cur = conn.cursor()
- pointA={}
- pointA['lat']=-7.83753572095
- pointA['lon']=110.354612964
- myquery = 'SELECT ST_AsText(ST_MakePoint(%s, %s)) ;'
- pointA['geom']= cur.execute(myquery %(pointA['lat'], pointA['lon'])).fetchone()
- AttributeError: 'NoneType' object has no attribute 'fetchone'
- POINT(-7.83753572095 110.354612964)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement