我使用erlport在erlang和python之间传递数据,遵循以下示例: http://erlport.org/docs/python.html
我正在调用的python文件只包含以下行:
import pandas as pd
我收到错误:
** exception error: {python,'exceptions.AttributeError',
"'function' object has no attribute 'lower'",
[{<<"/anaconda/lib/python2.7/site-packages/pandas/core/format.py">>,
1701,<<"detect_console_encoding">>,
<<"if not encoding or 'ascii' in encoding.lower(): # try again for something bette"...>>},
{<<"/anaconda/lib/python2.7/site-packages/pandas/core/config_init.py">>,
234,<<"<module>">>,
<<"cf.register_option('encoding', detect_console_encoding(), pc_encoding_doc,">>},
{<<"/anaconda/lib/python2.7/site-packages/pandas/__init__.py">>,
25,<<"<module>">>,<<"import pandas.core.config_init">>},
{<<"/Documents/data-algorithms/Alg"...>>,
3,<<"<module>">>,<<"import pandas as pd">>},
{<<"/Documents/testki"...>>,
237,<<"_incoming_call">>,
<<"f = __import__(module, {}, {}, [objects[0]])">>},
{<<"/Documents/te"...>>,
245,<<"_call_with_error_handler">>,<<"function(*args)">>}]}
in function erlport:call/3 (src/erlport.erl, line 234)
in call from algo_tester:start/0 (src/algo_tester.erl, line 27)
我可以通过在/anaconda/lib/python2.7/site-packages/pandas/core/config_init.py
中注释掉以下两行来消除错误:
234 cf.register_option('encoding', detect_console_encoding(), pc_encoding_doc,
235 validator=is_text)
但是打印不再有效。
有没有人遇到过这个?
答案 0 :(得分:1)
在GitHub上回答: