Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Connection Error(TTransportException) to Hive using SQLAlchemy API

Open
#436 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python, sqlalchemy
Domain
databases

Research direction

Start by reproducing the SQLAlchemy create_engine and inspect(engine) connection with the listed PyHive, sasl, thrift, and thrift-sasl versions. Trace the reported TTransportException through the SASL connection path and determine whether a supported mechanism or dependency configuration is missing; done means the cause and a verified fix or limitation are documented.

Written by the indexing model from the issue text.

Description

Hi.

I am trying to connect Hive server using PyHive and SQLAlchemy API with SASL as below code:

ssl_args = {'ssl_cert': 'cacerts.pem'}
engine = create_engine("hive://username:[email protected]:10000/default?auth=LDAP", connect_args=ssl_args)
insp = inspect(engine)

But it makes error like below:

thrift.transport.TTransport.TTransportExceptiojn: Could not start SASL; b'Error in sasl_client_start (-4) SASL(-4): no mechanism avaliable: No worthy mechs found'

I tested it on Python 3.6.8 and two virtual environments.

first venv: SQLAlchemy==1.4.35, PyHive==0.6.5, sasl==0.2.1, thrift==0.10.0, thrift-sasl==0.3.0
second venv: SQLAlchemy==1.4.35, PyHive==0.6.5, sasl==0.3.1, thrift==0.16.0, thrift-sasl==0.4.3

Could you please let me know how to fix this issue?

Dominant language
Python
Stars
1.7k
Forks
544
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dropbox/PyHive

All issues in dropbox/PyHive

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.