2013-12-12 143 views
0

我使用erlport Erlang和蟒蛇之間傳遞數據,以下這裏的例子: http://erlport.org/docs/python.html熊貓和erlport之間的衝突?

我只叫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) 

但是然後打印不再工作。

有沒有人遇到過這個?

回答