uoz 作業日記

様々な作業の記録を共有するブログです。

CouchDBつかってて、PythonのMap/reduce関数でなんかエラー出るとき

Error: An error occurred accessing the view
No response

とかでる
そのときpythonでコードを書いてて、
/var/log/couchdb/couchdb.log

 {<0.6431.6>,crash_report,
                       [[{initial_call,{couch_file,init,['Argument__1']}},
                         {pid,<0.6431.6>},
                         {registered_name,[]},
                         {error_info,
                          {exit,
                           {{try_clause,
                             {[{<<"error">>,
                                {[{<<"reason">>,
                                   <<"unindent does not match any outer indentation level">>},   #ここ!
                                  {<<"id">>,
                                   <<"reduce_compilation_error">>}]}}]}},
以下略

とか書いてあったら、pythonでインデントとかがあってないというエラー
改行とか変なインデントとかをチェック
特に最終行のあと空白行とかあるとひっかかりがち