BioSTEAMDevelopmentGroup / thermosteam

BioSTEAM's Premier Thermodynamic Engine
Other
57 stars 12 forks source link

TypeError: 'NoneType' Object is not callable #82

Closed wennanlong closed 1 year ago

wennanlong commented 1 year ago

Describe the bug import thermosteam failure

To Reproduce from thermosteam import Chemical, Mixture ........\Anaconda3\envs\opgee\lib\site-packages\thermosteam__init.py:38: in from . import ( ........\Anaconda3\envs\opgee\lib\site-packages\thermosteam\separations.py:15: in import flexsolve as flx ........\Anaconda3\envs\opgee\lib\site-packages\flexsolve\init.py:7: in from . import open_solvers ........\Anaconda3\envs\opgee\lib\site-packages\flexsolve\open_solvers.py:8: in from flexsolve.bounded_solvers import IQ_interpolation ........\Anaconda3\envs\opgee\lib\site-packages\flexsolve\bounded_solvers.py:10: in from . import utils ........\Anaconda3\envs\opgee\lib\site-packages\flexsolve\utils.py:69: in def scalar_fixedpoint_converged(dx, xtol): ........\Anaconda3\envs\opgee\lib\site-packages\numba\core\decorators.py:219: in wrapper disp.compile(sig) ........\Anaconda3\envs\opgee\lib\site-packages\numba\core\dispatcher.py:946: in compile cres = self._cache.load_overload(sig, self.targetctx) ........\Anaconda3\envs\opgee\lib\site-packages\numba\core\caching.py:633: in load_overload target_context.refresh() ........\Anaconda3\envs\opgee\lib\site-packages\numba\core\base.py:270: in refresh self.load_additional_registries() ........\Anaconda3\envs\opgee\lib\site-packages\numba\core\cpu.py:80: in load_additional_registries from numba.np import npdatetime ........\Anaconda3\envs\opgee\lib\site-packages\numba\np\npdatetime.py:15: in from numba.np import npdatetime_helpers, numpy_support, npyfuncs ........\Anaconda3\envs\opgee\lib\site-packages\numba\np\npyfuncs.py:17: in from numba.cpython import cmathimpl, mathimpl, numbers ........\Anaconda3\envs\opgee\lib\site-packages\numba\cpython\cmathimpl.py:12: in from numba.cpython import builtins, mathimpl ........\Anaconda3\envs\opgee\lib\site-packages\numba\cpython\mathimpl.py:26: in _NP_FLT_FINFO = np.finfo(np.dtype('float32')) ........\Anaconda3\envs\opgee\lib\site-packages\numpy\core\getlimits.py:462: in new__ dtype = numeric.dtype(type(dtype)) E TypeError: 'NoneType' object is not callable

Expected behavior No import error

Actual behavior Full trace back, as text or a screenshot

Version

Additional context Add any other context about the problem here.

yoelcortes commented 1 year ago

@wennanlong, thanks for posting the full traceback! I think this may have to do with numba's overload decorator and python 3.10 compatibility. For now, I would suggest using an Anaconda installation of python 3.9 and reinstalling thermosteam to get it working. I will check this error in detail over the weekend by installing python 3.10 , testing numba's overload, and possibly submit an issue to numba if the error is on their side.

Thanks!

wennanlong commented 1 year ago

Hi Yoel,

Thanks for your reply! Python 3.9 works for me. And it turns out that Thermosteam works well with Python 3.10. It’s just the Pycharm issue that won’t allow me to run in debug mode.

Regards, Wennan

From: Yoel @.> Sent: Wednesday, November 30, 2022 6:48 AM To: BioSTEAMDevelopmentGroup/thermosteam @.> Cc: Wennan Long @.>; Mention @.> Subject: Re: [BioSTEAMDevelopmentGroup/thermosteam] TypeError: 'NoneType' Object is not callable (Issue #82)

@wennanlonghttps://github.com/wennanlong, thanks for posting the full traceback! I think this may have to do with numba's overload decorator and python 3.10 compatibility. For now, I would suggest using an Anaconda installation of python 3.9 and reinstalling thermosteam to get it working. I will check this error in detail over the weekend by installing python 3.10 and testing numba's overload and possibly submit an issue to numba if the error is on their side.

Thanks!

— Reply to this email directly, view it on GitHubhttps://github.com/BioSTEAMDevelopmentGroup/thermosteam/issues/82#issuecomment-1332281232, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKUFDJA2IP6KEMNT7ZUY4SDWK5SLXANCNFSM6AAAAAASPISMSU. You are receiving this because you were mentioned.Message ID: @.***>