[pyar] Consulta de novato para debugear...
Pumarfa
pumarfa en gmail.com
Mie Oct 6 19:55:16 ART 2010
Hola a todos.
Como en algún momento, a alguien de ésta lista, he aconsejado que viese de
implementar CouchDB, he comenzado a probar mi propia medicina.
Es así que me encuentro con una herramienta realizada en Python, CouchApp,
que facilita la creación de aplicaciones sencillas sobre el mismo motor
CouchDB. Y es aquí donde encuentro un escollo.
Siguiendo un manual, supuestamente muy sencillo, me da los pasos para
generar una aplicación de ejemplo "Sofa". Pero me devuelve un error que no
he podido encontrar solución Googleando.
"Error running !code or !json on function "map": 'ascii' codec can't decode
byte 0xc3 in position 15: ordinal not in range(128)"
En el proyecto de CouchApp no aparece referencia alguna al error, y en las
búsquedas realizadas encuentro que se trata de un error generado al no
tratar correctamente un string que es pasado como parámetro.
Mi problema puntual es ¿como encuentro el lugar exacto donde se pasa el
parámetro que genera el error?
Para no extender demasiado el mensaje, adjunto un archivo con la información
devuelta por CouchApp al ejecutar.
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20101006/5ff84989/attachment.html>
------------ próxima parte ------------
sofa$ couchapp -v push . http://127.0.0.1:5984/sofa
2010-10-06 19:53:05 [DEBUG] Start request: GET http://127.0.0.1:5984
2010-10-06 19:53:05 [DEBUG] Request headers: [['GET / HTTP/1.1\r\n', 'Host: 127.0.0.1:5984\r\n', 'User-Agent: couchapp/0.6.2\r\n', 'Accept-Encoding: identity\r\n', 'Accept: application/json\r\n', '\r\n']]
2010-10-06 19:53:05 [DEBUG] Start response: HTTP/1.1 200 OK
2010-10-06 19:53:05 [DEBUG] Response headers: [[('Date', 'Wed, 06 Oct 2010 22:53:05 GMT'), ('Content-Length', '41'), ('Cache-Control', 'must-revalidate'), ('Content-Type', 'application/json'), ('Server', 'CouchDB/0.10.0 (Erlang OTP/R13B)')]]
2010-10-06 19:53:05 [DEBUG] Return response: http://127.0.0.1:5984
2010-10-06 19:53:05 [DEBUG] Start request: HEAD http://127.0.0.1:5984/sofa
2010-10-06 19:53:05 [DEBUG] Request headers: [['HEAD /sofa HTTP/1.1\r\n', 'Host: 127.0.0.1:5984\r\n', 'User-Agent: couchapp/0.6.2\r\n', 'Accept-Encoding: identity\r\n', 'Accept: application/json\r\n', '\r\n']]
2010-10-06 19:53:05 [DEBUG] Start response: HTTP/1.1 200 OK
2010-10-06 19:53:05 [DEBUG] Response headers: [[('Date', 'Wed, 06 Oct 2010 22:53:05 GMT'), ('Content-Length', '184'), ('Cache-Control', 'must-revalidate'), ('Content-Type', 'application/json'), ('Server', 'CouchDB/0.10.0 (Erlang OTP/R13B)')]]
2010-10-06 19:53:05 [DEBUG] Return response: http://127.0.0.1:5984/sofa
2010-10-06 19:53:05 [DEBUG] push lists/comments.js
2010-10-06 19:53:05 [DEBUG] push lists/post.js
2010-10-06 19:53:05 [DEBUG] push lists/index.js
2010-10-06 19:53:05 [DEBUG] push validate_doc_update.js
2010-10-06 19:53:05 [DEBUG] push rewrites.json
2010-10-06 19:53:05 [DEBUG] push README.md
2010-10-06 19:53:05 [DEBUG] push blog.json
2010-10-06 19:53:05 [DEBUG] push templates/edit.html
2010-10-06 19:53:05 [DEBUG] push templates/post.html
2010-10-06 19:53:05 [DEBUG] push templates/partials/scripts.html
2010-10-06 19:53:05 [DEBUG] push templates/partials/header.html
2010-10-06 19:53:05 [DEBUG] push templates/partials/comment.html
2010-10-06 19:53:05 [DEBUG] push templates/index.html
2010-10-06 19:53:05 [DEBUG] push shows/edit.js
2010-10-06 19:53:05 [DEBUG] push shows/post.js
2010-10-06 19:53:05 [DEBUG] push views/post-page/map.js
2010-10-06 19:53:05 [DEBUG] push views/recent-posts/map.js
2010-10-06 19:53:05 [DEBUG] push views/comments/map.js
2010-10-06 19:53:05 [DEBUG] push views/tags/map.js
2010-10-06 19:53:05 [DEBUG] push views/tags/reduce.js
2010-10-06 19:53:05 [DEBUG] push helpers/md5.js
2010-10-06 19:53:05 [DEBUG] push evently/tagcloud/_init/data.js
2010-10-06 19:53:05 [DEBUG] push evently/tagcloud/_init/query.json
2010-10-06 19:53:05 [DEBUG] push evently/tagcloud/_init/mustache.html
2010-10-06 19:53:05 [DEBUG] push evently/profile/loggedOut/mustache.html
2010-10-06 19:53:05 [DEBUG] push evently/profile/profileReady/selectors/form/submit.js
2010-10-06 19:53:05 [DEBUG] push evently/profile/profileReady/selectors/#preview/click.js
2010-10-06 19:53:05 [DEBUG] push evently/profile/profileReady/mustache.html
2010-10-06 19:53:05 [DEBUG] push evently/account/loggedIn/data.js
2010-10-06 19:53:05 [DEBUG] push evently/account/loggedIn/mustache.html
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/metadata.json
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/README.md
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/profile/noProfile/selectors/form/submit.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/profile/noProfile/data.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/profile/noProfile/mustache.html
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/profile/loggedOut/mustache.html
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/profile/loggedOut/after.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/profile/loggedIn.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/profile/profileReady/data.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/profile/profileReady/mustache.html
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/profile/profileReady/after.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/doLogin.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/signupForm/selectors/form/submit.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/signupForm/selectors/a[href=#login].json
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/signupForm/mustache.html
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/signupForm/after.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/adminParty/mustache.html
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/loginForm/selectors/a[href=#signup].json
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/loginForm/selectors/form/submit.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/loginForm/mustache.html
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/loginForm/after.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/_init.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/doLogout.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/loggedOut/selectors.json
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/loggedOut/mustache.html
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/doSignup.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/loggedIn/selectors.json
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/loggedIn/data.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/loggedIn/mustache.html
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/evently/account/loggedIn/after.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/validate.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/code.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/markdown.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/md5.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/path.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/redirect.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/docform.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/mustache.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/cache.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/utils.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/list.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/atom.js
2010-10-06 19:53:05 [DEBUG] push vendor/couchapp/lib/linkup.js
2010-10-06 19:53:05 [DEBUG] push vendor/textile/textile.js
2010-10-06 19:53:05 [DEBUG] push lib/validate.js
2010-10-06 19:53:05 [DEBUG] push lib/mustache.js
2010-10-06 19:53:05 [DEBUG] push lib/blog.js
2010-10-06 19:53:05 [DEBUG] push sofa2.txt
2010-10-06 19:53:05 [DEBUG] push THANKS.txt
2010-10-06 19:53:05 [DEBUG] attach LICENSE.txt
2010-10-06 19:53:05 [DEBUG] attach THANKS.txt
2010-10-06 19:53:05 [DEBUG] attach images/icon.png
2010-10-06 19:53:05 [DEBUG] attach style/screen.css
2010-10-06 19:53:05 [DEBUG] attach script/app.js
2010-10-06 19:53:05 [DEBUG] attach script/md5.js
2010-10-06 19:53:05 [DEBUG] attach script/jquery.scrollTo.js
2010-10-06 19:53:05 [DEBUG] attach vendor/couchapp/loader.js
2010-10-06 19:53:05 [DEBUG] attach vendor/couchapp/jquery.couch.app.util.js
2010-10-06 19:53:05 [DEBUG] attach vendor/couchapp/jquery.mustache.js
2010-10-06 19:53:05 [DEBUG] attach vendor/couchapp/jquery.pathbinder.js
2010-10-06 19:53:05 [DEBUG] attach vendor/couchapp/jquery.evently.js
2010-10-06 19:53:05 [DEBUG] attach vendor/couchapp/jquery.couch.app.js
2010-10-06 19:53:05 [DEBUG] process function: edit
2010-10-06 19:53:05 [DEBUG] process function: post
2010-10-06 19:53:05 [DEBUG] process function: index
2010-10-06 19:53:05 [DEBUG] process function: post
2010-10-06 19:53:05 [DEBUG] process function: comments
2010-10-06 19:53:05 [DEBUG] process function: validate_doc_update
2010-10-06 19:53:05 [DEBUG] process function: map
2010-10-06 19:53:05 [DEBUG] process function: map
2010-10-06 19:53:05 [CRITICAL] Error running !code or !json on function "map": 'ascii' codec can't decode byte 0xc3 in position 15: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/Couchapp-0.6.2-py2.6.egg/couchapp/dispatch.py", line 48, in dispatch
return _dispatch(args)
File "/usr/local/lib/python2.6/dist-packages/Couchapp-0.6.2-py2.6.egg/couchapp/dispatch.py", line 88, in _dispatch
return fun(conf, conf.app_dir, *args, **opts)
File "/usr/local/lib/python2.6/dist-packages/Couchapp-0.6.2-py2.6.egg/couchapp/commands.py", line 75, in push
doc.push(dbs, atomic, browse, force)
File "/usr/local/lib/python2.6/dist-packages/Couchapp-0.6.2-py2.6.egg/couchapp/localdoc.py", line 115, in push
doc = self.doc()
File "/usr/local/lib/python2.6/dist-packages/Couchapp-0.6.2-py2.6.egg/couchapp/localdoc.py", line 197, in doc
objects)
File "/usr/local/lib/python2.6/dist-packages/Couchapp-0.6.2-py2.6.egg/couchapp/macros.py", line 28, in package_views
apply_lib(doc, funcs, app_dir, objs)
File "/usr/local/lib/python2.6/dist-packages/Couchapp-0.6.2-py2.6.egg/couchapp/macros.py", line 42, in apply_lib
"Error running !code or !json on function \"%s\": %s" % (k, e))
MacroError: Error running !code or !json on function "map": 'ascii' codec can't decode byte 0xc3 in position 15: ordinal not in range(128)
More information about the pyar
mailing list