0

I am trying to connect to Oracle database using JDBC in python 3 (jupyter notebook) using JayDeBeApi module but I am getting this error

__init__() missing 1 required positional argument: 'gateway_parameters'

Really appreciate the help to figure this out.

import jaydebeapi as jdbc

conn = jdbc.connect('oracle.jdbc.driver.OracleDriver', 
  ["jdbc:oracle:thin:.","username","password"],"\\path-to-ojdbc6.jar")

curs = conn.cursor()
Andrew
  • 26,706
  • 9
  • 85
  • 101

1 Answers1

0

From what I see in the project readme, where it says that this is the connecting part:

>>> import jaydebeapi
>>> conn = jaydebeapi.connect("org.hsqldb.jdbcDriver",
...                           "jdbc:hsqldb:mem:.",
...                           ["SA", ""],
...                           "/path/to/hsqldb.jar",)

it seems that you put the square bracket [ too early, it should be like this:

conn = jdbc.connect('oracle.jdbc.driver.OracleDriver', 
  "jdbc:oracle:thin:.", ["username","password"],"\\path-to-ojdbc6.jar")
Novak
  • 2,143
  • 1
  • 12
  • 22