Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Initializing document with empty dic fails #8

@djc

Description

@djc

From ilzogo...@gmail.com on March 15, 2008 22:32:59

db['people'] = {}

returns:

[info] [<0.47.0>] HTTP Request: PUT /strigo-data/people HTTP/1.1
[info] [<0.47.0>] HTTP Error (code 500): {obj,[{error,"EXIT"},
{reason,"{function_clause,[{cjson,tokenize,\n
[[],{decoder,utf8,null,1,1,any}]},\n
{cjson,decode1,2},\n {cjson,json_decode,2},\n
{mod_couch,handle_doc_put,2},\n
{mod_couch,do,1},\n {httpd_response,traverse_modules,2},\n
{httpd_response,generate_and_send_response,1},\n
{httpd_request_handler,handle_response,1}]}"}]}
[info] [<0.47.0>] HTTP Response Code:500

---- solution ----

line 628 in client.py
it does "if content:", which is gonna be false on your empty dict
yep
it should be "if not content is None:"
so yes it does end up doing an empty put
which is bad
you can post the bug and include that :)

Original issue: http://code.google.com/p/couchdb-python/issues/detail?id=7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions