Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Cannot instantiate libJHTDB() #47

Open
tmatsuzawa opened this issue Jul 3, 2024 · 0 comments
Open

Cannot instantiate libJHTDB() #47

tmatsuzawa opened this issue Jul 3, 2024 · 0 comments

Comments

@tmatsuzawa
Copy link

tmatsuzawa commented Jul 3, 2024

Hi I have installed pyJHTDB on my Mac.
For the first-time uesrs, README suggests running the following lines.

from pyJHTDB import test_plain
test_plain()

However, this raises an error as it cannot instantiate pyJHTDB.libJHTDB(). What is causing this behavior?

To reproduce, run

import numpy as np
import pyJHTDB
from pyJHTDB import libJHTDB

lTDB = pyJHTDB.libJHTDB()

Error message:

OSError                                   Traceback (most recent call last)
<ipython-input-5-16a1b3452a7b> in <module>
      1 from pyJHTDB import test_plain
----> 2 test_plain()

~/Documents/git/takumi/pyJHTDB/pyJHTDB/test.py in test_plain(N)
     65 
     66     # load shared library
---> 67     lTDB = pyJHTDB.libJHTDB()
     68     #initialize webservices
     69     lTDB.initialize()

~/Documents/git/pyJHTDB/pyJHTDB/libJHTDB.py in __init__(self, auth_token)
     45         self.lib = np.ctypeslib.load_library(
     46             self.libname,
---> 47             os.path.abspath(os.path.join(lib_location, os.path.pardir)))
     48         self.authToken = ctypes.c_char_p(auth_token.encode('ascii'))
     49         self.connection_on = False

~/anaconda3/lib/python3.7/site-packages/numpy/ctypeslib.py in load_library(libname, loader_path)
    152                     raise
    153         ## if no successful return in the libname_ext loop:
--> 154         raise OSError("no file with expected extension")
    155 
    156 

OSError: no file with expected extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant