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

driver 3.0.0 TypeDB.core_driver arguments #732

Open
codingeologist opened this issue Jan 2, 2025 · 0 comments
Open

driver 3.0.0 TypeDB.core_driver arguments #732

codingeologist opened this issue Jan 2, 2025 · 0 comments

Comments

@codingeologist
Copy link

Description

TypeDB.core_driver has too many required arguments: credentials and driver_options.

In order to fix this, need to role back to typedb.driver version 2.29.2

Environment

  1. TypeDB distribution: Core
  2. TypeDB version: 3.0.0 / 2.29.2
  3. Environment: Linux/WSL
  4. Studio version:
  5. Other details:

Reproducible Steps

  1. Set up
pip3 install typedb-driver==3.0.0
  1. Execute
import typedb.driver as driver
from typedb.driver import TypeDB

class TypeDBConnector:

    def __init__(self):
        
        self.connection = "localhost:1729"
        self.database = "database-name"
    

    def open_connection(self):

        client = TypeDB.core_driver(address=self.connection)
        session = client.session(self.database, driver.SessionType.DATA)
        return client, session
    

    def close_connection(self, session, client):

        session.close()
        client.close()
  1. Unexpected result
client = TypeDB.core_driver(address=self.connection)
TypeError: TypeDB.core_driver() missing 2 required positional arguments: 'credentials' and 'driver_options'

Expected result

creates a connection to the database and be able to query it

Additional information

need to uninstall typedb-driver==3.0.0 and pip install typedb-driver==2.29.2 in the python venv as a workaround.

Relevant logs from TypeDB or Driver:

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

1 participant