Raghav Kukreti
Raghav Kukreti

Reputation: 590

ORA-12638: Credential retrieval failed Bundling Python( pyQt + cx_Oracle) application using pyinstaller for Windows

I'm building a GUI application on Windows using pyQt which queries an Oracle database using a connection string such as username/password@host_ip:port/db_name. Now when I run the application using python3 gui.py, it works, connects to the host and extracts the required information but when I compile it to an exe, it gives me the infamous ORA-12638.

I've scoured the interwebs for solutions ie: how to properly package cx_Oracle applications using pyinstaller and have done the following:

  1. Add InstantClient and Qt DLLs to the path
  2. Create a tnsnames.ora in the same folder as the exe

But to no avail. The program works perfectly when I run it using python3 gui.py but somehow breaks when compiled. Am I missing something simple?

Upvotes: 1

Views: 1247

Answers (1)

Raghav Kukreti
Raghav Kukreti

Reputation: 590

I fixed my issue by changing the contents of the sqlnet.ora file to

SQLNET.AUTHENTICATION_SERVICES = (NONE)

instead of

SQLNET.AUTHENTICATION_SERVICES = (NTS)

The corresponding issue I opened : https://github.com/oracle/python-cx_Oracle/issues/328

Upvotes: 2

Related Questions