Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Using Apple Silicon, can't run the initial test #30

Open
seanp333 opened this issue Mar 21, 2023 · 3 comments
Open

Using Apple Silicon, can't run the initial test #30

seanp333 opened this issue Mar 21, 2023 · 3 comments

Comments

@seanp333
Copy link

I am attempting to use this to connect to a SQL Anywhere 17 database, but unfortunately I can't complete the initial test upon installing the application. What am I doing wrong? Here is the traceback:

`InterfaceError                            Traceback (most recent call last)
Cell In[3], line 2
      1 import sqlanydb
----> 2 conn = sqlanydb.connect(uid='dba', pwd='sql', eng='demo', dbn='demo' )
      3 curs = conn.cursor()
      4 curs.execute("select 'Hello, world!'")

File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/sqlanydb.py:566, in connect(*args, **kwargs)
    564 def connect(*args, **kwargs):
    565     """Constructor for creating a connection to a database."""
--> 566     return Connection(args, kwargs)

File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/sqlanydb.py:582, in Connection.__init__(self, args, kwargs, parent)
    578 if parent == None:
    579 
    580     # cache the Root() object so we don't load it every time
    581     if Connection.cls_parent == None:
--> 582         parent = Connection.cls_parent = Root("PYTHON")
    583     else:
    584         parent = Connection.cls_parent

File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/sqlanydb.py:496, in Root.__init__(self, name)
    493 def __init__(self, name):
    495     lg.debug("Attempting to load dbcapi library")
--> 496     self.api = load_library(os.getenv( 'SQLANY_API_DLL', None ), 'dbcapi.dll', 'libdbcapi_r.so',
    497                             'libdbcapi_r.dylib')
    498     ver = c_uint(0)
    499     try:

File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/sqlanydb.py:488, in load_library(*names)
    486     except OSError as ose:
    487         continue
--> 488 raise InterfaceError("Could not load dbcapi.  Tried: " + ','.join(map(str, names)))

InterfaceError: ('Could not load dbcapi.  Tried: /Applications/SQLAnywhere17/System/lib64/libdbcapi_r.dylib,dbcapi.dll,libdbcapi_r.so,libdbcapi_r.dylib', 0)`
@zhaobozb
Copy link

Hi @seanp333, did you solve your issue?

@OliverBojahrS24
Copy link

Same here any new ideas out there?

@DanCummins-SAP
Copy link
Collaborator

Can you still get an x64 version of Python to run on your Apple M ? There's no dbcapi for Apple M yet.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants