ibis-project / ibis

the portable Python dataframe library
https://ibis-project.org
Apache License 2.0
4.3k stars 537 forks source link

bug: ibis.trino.connect throwing traceback error #9113

Open Tay0z opened 2 weeks ago

Tay0z commented 2 weeks ago

What happened?

Not sure if this is a user error or bug but the way I connected to Trino using ibis-framework v.8.0.0 is not working in 9.0.0

Here is an example of the code:

if __name__=='__main__':
    con = ibis.trino.connect(
        host = 'trino_host',
        user='myusername',
        password='mypassword',
        port=443,
        database='trino_catalog',
        schema='trino_schema',
        http_scheme='https'
    )
    run_query="SELECT * FROM trino_catalog.trino_schema.trino_table LIMIT 1"
    query_ran = con.sql(run_query).execute()
    print(query_ran)

And here is the traceback error it returns:

File "\site-packages\trino\client.py", line 434, in __init__
 self._auth.set_http_session(self._http_session)
 ^^^^^^^^^^^^^^^^^^^^
AttributeError:'str' object has no attribute 'set_http_session'

What version of ibis are you using?

ibis-framework==9.0.0

What backend(s) are you using, if any?

Trino

Relevant log output

.
File "\site-packages\trino\client.py", line 434, in __init__
 self._auth.set_http_session(self._http_session)
 ^^^^^^^^^^^^^^^^^^^^
AttributeError:'str' object has no attribute 'set_http_session'
.

Code of Conduct

cpcloud commented 1 week ago

Can you show the version of the trino client you're using?

Something like this:

In [1]: import trino

In [2]: trino.__version__
Out[2]: '0.328.0'