on ‎2018 Feb 21 6:29 PM
I recently upgraded my OS to High Sierra, and since then I have not been able to use the sqlanydb library with my flask app. I was using SQLAnywhere16 and recently upgraded to SQLAnywhere17 after reading that it might solve problem, but it did not.
I start by sourcing sa_config.sh located at /Applications/SQLAnywhere17/System/bin64/sa_config.sh. Then I run my flask app. In the initialization of my app, I create a connection using sqlanydb.connect(), and I am met with the following traceback.
File "/usr/local/lib/python3.6/site-packages/lib/python/site-packages/sqlanydb.py", line 522, in connect
return Connection(args, kwargs)
File "/usr/local/lib/python3.6/site-packages/lib/python/site-packages/sqlanydb.py", line 538, in __init__
parent = Connection.cls_parent = Root("PYTHON")
File "/usr/local/lib/python3.6/site-packages/lib/python/site-packages/sqlanydb.py", line 464, in __init__
'libdbcapi_r.dylib')
File "/usr/local/lib/python3.6/site-packages/lib/python/site-packages/sqlanydb.py", line 456, in load_library
raise InterfaceError("Could not load dbcapi. Tried: " + ','.join(map(str, names)))
sqlanydb.InterfaceError: (u'Could not load dbcapi. Tried: None,dbcapi.dll,libdbcapi_r.so,libdbcapi_r.dylib', 0)
When I run the python3.6 interpreter, I am able to import the sqlanydb and connect to my database just fine, with no error. But when I try to connect inside my flask app, I get this error.
Request clarification before answering.
High Sierra will "purge" DYLD_LIBRARY_PATH now for protected processes - see the docs from Apple.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.