我最近开始使用couchdb和python-couchdb。问题是,当我使用蒲团运行我在python中编写的视图时,我收到以下错误消息:
错误:os_process_error
{EXIT_STATUS,1}
即使是默认视图也会崩溃。
def fun(doc):
yield None, doc
我还没有找到关于这个问题的大量信息,所以此时我真的输了。这是我从couchdb获得的日志:
{<0.3907.0>,crash_report,
[[{initial_call,{couch_file,init,['Argument__1']}},
{pid,<0.3907.0>},
{registered_name,[]},
{error_info,
{exit,
{os_process_error,{exit_status,1}},
[{gen_server,terminate,6},{proc_lib,init_p_do_apply,3}]}},
{ancestors,
[<0.3906.0>,couch_view,couch_secondary_services,couch_server_sup,
<0.33.0>]},
{messages,[]},
{links,[#Port<0.1483>,<0.3910.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,377},
{stack_size,24},
{reductions,1423}],
[{neighbour,
[{pid,<0.3910.0>},
{registered_name,[]},
{initial_call,{couch_ref_counter,init,['Argument__1']}},
{current_function,{gen_server,loop,6}},
{ancestors,
[<0.3906.0>,couch_view,couch_secondary_services,
couch_server_sup,<0.33.0>]},
{messages,[]},
{links,[#Port<0.1483>,<0.3910.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,377},
{stack_size,24},
{reductions,1423}],
[{neighbour,
[{pid,<0.3910.0>},
{registered_name,[]},
{initial_call,{couch_ref_counter,init,['Argument__1']}},
{current_function,{gen_server,loop,6}},
{ancestors,
[<0.3906.0>,couch_view,couch_secondary_services,
couch_server_sup,<0.33.0>]},
{messages,
[{'DOWN',#Ref<0.0.0.16475>,process,<0.3906.0>,
{os_process_error,{exit_status,1}}}]},
{links,[<0.3907.0>]},
{dictionary,[]},
{trap_exit,false},
{status,runnable},
{heap_size,233},
{stack_size,9},
{reductions,47}]}]]}}
我在Ubuntu 10.04上使用Django,couchdb和python-couchdb运行它。关于javascript的观点工作正常。
答案 0 :(得分:1)
对于couchdb-python查询服务器退出状态1表示一些错误。
您使用的是什么版本的couchdb / couchdb-python?
如果您直接从命令行运行couchpy(或/ usr / local / bin / couchpy或您在query_servers部分中为python键设置的任何内容),那么输出是什么?示例应该是:
$
~ $ couchpy
["reset"]
true
["add_fun", "def fun(doc): yield None, None"]
true
["map_doc", {}]
[[[null, null]]]
如果p.2工作正常,请尝试启用CouchDB调试日志级别以跟踪查询服务器命令并注意它何时崩溃。如果您确定这是一个python查询服务器错误,请写一些关于它的story。感谢(:
P.S。我希望你有正确的setup python查询服务器,但是双重检查从来没有用过(;