sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #48407
Re: [Question #673447]: [error] ImportError ( No module named psycopg2 )"
Question #673447 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/673447
Description changed to:
I have updated PIP and installed psycopg2 module but when I run the code from sikukli with python it gives me this error message. I'm running Sikuli on windows 10.
Same code works fine as an independent python file.
import csv
import psycopg2
try:
conn = psycopg2.connect(host='test5', database="TestDB", port="5432", user="postgres",password="test",options='-c search_path="users"')
print "connection successful"
except:
print "I am unable to connect to the database"
cur = conn.cursor()
cur.execute("SET search_path TO users")
cur.execute(""" SELECT * from "UserDetail" """)
rows = cur.fetchall()
print "\nShow me the data:\n"
for row in rows:
print " ", row[0]
print " ", row[1]
print " ", row[2]
print " ", row[3]
While running from Sikuli I get this error
[error] ImportError ( No module named psycopg2 )"
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.