BenThelen / python-refprop

Python (3.x & 2.x) API for NIST Standard Reference Database 23 (a.k.a. Refprop) on Linux and Windows
Other
43 stars 25 forks source link

SETPATHdll Function not defined #7

Closed jlee2109 closed 10 years ago

jlee2109 commented 10 years ago

The module will import, but when the rptest.py file is run (or when many of the functions in the module are run), you will get an error because SETPATHdll is not defined in the module. The exact error is this:

Traceback (most recent call last): File "", line 1, in File "C:\Users\jlee6\Documents\Test Python\rptest.py", line 19, in settest _maintest(rp) File "C:\Users\jlee6\Documents\Test Python\rptest.py", line 29, in _maintest if rp.test(): #if True; rptest =>>for testing purpose File "C:\Python27\lib\refprop.py", line 1046, in test prop = setup(u'def', u'air') File "C:\Python27\lib\refprop.py", line 1556, in setup _load() File "C:\Python27\lib\refprop.py", line 482, in _load setpath() File "C:\Python27\lib\refprop.py", line 577, in setpath _setpath(path) File "C:\Python27\lib\refprop.py", line 617, in _setpath _rp.SETPATHdll(ctypes.byref(_hpth), ctypes.c_long(255)) File "C:\Python27\lib\ctypesinit.py", line 378, in getattr func = self.getitem(name) File "C:\Python27\lib\ctypesinit.py", line 383, in getitem func = self._FuncPtr((name_or_ordinal, self)) AttributeError: function 'SETPATHdll' not found

If you examine the module, if is obvious why this is occuring (the function is truly not defined). I have tried hacking around this to get the module working, but I haven't succeeded. You eventually will have to run this segment of code, and it will fail. Is there anyway to use this module right now?

I have REFPROP installed correctly (I use it in excel all the time). The refprop.dll is exactly where it should be (C:\Program Files(x86)\REFPROP).

Please advise how to remedy this issue. We are trying to use this module for some very important R&D. If we can't get REFPROP ported to python, I don't know what we will do. Thanks!

BenThelen commented 10 years ago

The refprop python API has been updated this should be working fine now. Please try and send me feedback on this.