You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
Use Linux(centos7), Runing LightGBM In Pypy3, An exception occurs when I run the following code
import joblib
lgb = joblib.load('./catigory_xh.pkl')
for k in lgb.feature_name():
print(k);
Error Info
Traceback (most recent call last):
File "/usr/local/src/pypy3.6/lib_pypy/_ctypes/basics.py", line 56, in from_param
as_parameter = value._as_parameter_
AttributeError: 'int' object has no attribute '_as_parameter_'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "model.py", line 5, in <module>
for k in lgb.feature_name():
File "/usr/local/src/pypy3.6/site-packages/lightgbm/basic.py", line 3655, in feature_name
ptr_string_buffers = (ctypes.c_char_p * num_feature)(*map(ctypes.addressof, string_buffers))
File "/usr/local/src/pypy3.6/lib_pypy/_ctypes/array.py", line 203, in __init__
self[i] = arg
File "/usr/local/src/pypy3.6/lib_pypy/_ctypes/array.py", line 229, in __setitem__
cobj = self._type_.from_param(value)
File "/usr/local/src/pypy3.6/lib_pypy/_ctypes/primitive.py", line 372, in from_param
return super(SimpleType, self).from_param(value)
File "/usr/local/src/pypy3.6/lib_pypy/_ctypes/basics.py", line 59, in from_param
self.__name__, type(value).__name__))
TypeError: expected c_char_p instance instead of int
Python 3.6.12 (db1e853f94de, Nov 18 2020, 09:49:19)
[PyPy 7.3.3 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]
In fact, I have tried in other versions, and the error is the same catigory_xh.pkl
The text was updated successfully, but these errors were encountered:
JinShng
changed the title
Error Runing In Pypy3 "TypeError: expected c_char_p instance instead of int"
Error Runing In LightGBM "TypeError: expected c_char_p instance instead of int"
Nov 26, 2021
JinShng
changed the title
Error Runing In LightGBM "TypeError: expected c_char_p instance instead of int"
Error Runing LightGBM "TypeError: expected c_char_p instance instead of int"
Nov 26, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Use Linux(centos7), Runing LightGBM In Pypy3, An exception occurs when I run the following code
Error Info
LightGBM version:
Pypy Version:
In fact, I have tried in other versions, and the error is the same
catigory_xh.pkl
The text was updated successfully, but these errors were encountered: