Issue Loading dbcapi while connecting to sqlanydb


I am getting the error message below when trying to connect to sqlanydb;

Traceback (most recent call last):
File “C:/Users/X/PycharmProjects/untitled/”, line 2, in <module>
conn = sqlanydb.connect(uid=‘dba’, pwd=‘sql’, eng=‘demo’, dbn=‘demo’ )
File “C:\Users\X\AppData\Roaming\Python\Python38\site-packages\”, line 522, in connect
return Connection(args, kwargs)
File “C:\Users\X\AppData\Roaming\Python\Python38\site-packages\”, line 538, in __init__
parent = Connection.cls_parent = Root(“PYTHON”)
File “C:\Users\X\AppData\Roaming\Python\Python38\site-packages\”, line 463, in __init__
self.api = load_library(os.getenv( ‘SQLANY_API_DLL’, None ), ‘dbcapi.dll’, ‘’,
File “C:\Users\X\AppData\Roaming\Python\Python38\site-packages\”, line 456, in load_library
raise InterfaceError("Could not load dbcapi. Tried: " + ‘,’.join(map(str, names)))
sqlanydb.InterfaceError: (‘Could not load dbcapi. Tried: None,dbcapi.dll,,libdbcapi_r.dylib’, 0)

Process finished with exit code 1

I am using Python 3.8.2 (64-bit), SQL Anywhere 17, and PyCharm 2019.3.3, all for Windows.

I have other colleagues who can run the script/code that I am receiving this error on perfectly fine.  So I think it is probably more likely an issue with the set-up/installation of my application(s), rather than an issue with the code itself.

I would prefer not to edit the script/code at all, but would appreciate any guidance in making sure I have my applications set up properly, and/or resolving this issue.


Do you use Github Actions? Based on your description, you issue is more related to sql anywhere. You could try to ask it in SQLA forum:

Hi @mmcadam22,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our community organized so users can more easily find information.

As you’ll notice, your topic is now here in the Project Development Help and Advice board. No action is needed on your part; you can continue the conversation as normal here.