jchris / couchapp Goto Github PK
View Code? Open in Web Editor NEWThe official repo is now at http://github.com/couchapp/couchapp
Home Page: http://wiki.github.com/couchapp/couchapp
The official repo is now at http://github.com/couchapp/couchapp
Home Page: http://wiki.github.com/couchapp/couchapp
hi,
i got an Error while pushing a fresh couchapp with a ExtJs lib as attachment to my couch.
couchapp: Couchapp (version 0.7.1)
couchdb: Apache CouchDB 1.0.1
ubuntu: ubuntu: 10.10, 2.6.35-22-generic
python: Python 2.6.6
ExtJS:
sry, i habe no experience with python/couchapp, so i have no starting point to fix this problem, i tried it a few days ago at work with a couchapp-eclipse plugin, it had a similar Problem, i avoided it, by splitting the extjs package in smaller pieces. I suppose, the ext lib has too much args for couchapp.
I hope it will help you.
Great work!
so long tom
PS: Error log:
2010-11-22 20:25:55 [CRITICAL] unknown error [[Errno 111] Connection refused]
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/couchapp/dispatch.py", line 48, in dispatch
return _dispatch(args)
File "/usr/local/lib/python2.6/dist-packages/couchapp/dispatch.py", line 92, in _dispatch
return fun(conf, conf.app_dir, _args, *_opts)
File "/usr/local/lib/python2.6/dist-packages/couchapp/commands.py", line 77, in push
doc.push(dbs, noatomic, browse, force)
File "/usr/local/lib/python2.6/dist-packages/couchapp/localdoc.py", line 102, in push
db.save_doc(doc, force_update=True)
File "/usr/local/lib/python2.6/dist-packages/couchapp/client.py", line 281, in save_doc
resp = self.res.put(docid, payload=json.dumps(doc), *_params)
File "/usr/local/lib/python2.6/dist-packages/restkit/resource.py", line 179, in put
headers=headers, params_dict=params_dict, *_params)
File "/usr/local/lib/python2.6/dist-packages/couchapp/client.py", line 130, in request
raise RequestFailed("unknown error [%s]" % str(e))
RequestFailed: unknown error [[Errno 111] Connection refused]
would be nice to add handling *.coffee scripts instead of .js, and then pass out to coffeescript compiler before uploading to database.
Who is interested to handle coffeescript ? :)
Regards,
Andrzej
In OSX you must do the following to actually install...
sudo env ARCHFLAGS="-arch i386 -arch x86_64 -Wno-error=unused-command-line-argument-hard-error-in-future" pip install couchapp
That stupid -Wno-error=unused-command-line-argument-hard-error-in-future
was a big problem to find. Hah.
Trying to push to a db when the password has characters that need to be escaped and using single quotes (e.g. couchapp push . 'http://admin:mypas\$@url:5984/play_data') will result in a httplib.IncompleteRead: [] error. (http://gist.github.com/190362)
Using double quotes (e.g. couchapp push . "http://admin:mypas\$@url:5984/play_data") , however, works.
The help states:
couchapp generate [appdir]
However in reality the arguments are reversed as such that one have to write
couchapp generate [appdir]
Hi.
I have two .js files in /lists/ and two .html files in /templates/
Both list functions are like this:
function(head, req) {
// !json templates
}
When pushed to couchdb none of the directives is translated to var templates = { ...
Hi there,
I'm quite new to CouchDb, and I've discovered CouchApp recently. I've setup the version 0.9.1 of CouchDb on my Intel Mac.
It was working quqite well (view creation/Filtering, request etC....)
After all I setup CouchApp, but I got an odd error Message :(can anyone tell me if you have faced this problem ?
{"error":"{bad_return_value,{os_process_error,"OS process timed out."}}","reason":"{gen_server,call,\n [<0.23365.2>,\n {prompt,[<<"list_tail">>,\n {[{<<"info">>,\n {[{db_name,<<"sofa">>},\n {doc_count,1},\n {doc_del_count,0},\n {update_seq,14},\n {purge_seq,0},\n {compact_running,false},\n {disk_size,2006555},\n {instance_start_time,<<"1250206253086256">>}]}},\n {<<"verb">>,'GET'},\n {<<"path">>,\n [<<"sofa">>,<<"design">>,<<"sofa">>,<<"list">>,\n <<"index">>,<<"recent-posts">>]},\n {<<"query">>,\n {[{<<"descending">>,<<"true">>},\n {<<"limit">>,<<"5">>}]}},\n {<<"headers">>,\n {[{<<"Accept">>,\n <<"text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8">>},\n {<<"Accept-Charset">>,\n <<"ISO-8859-1,utf-8;q=0.7,*;q=0.7">>},\n {<<"Accept-Encoding">>,<<"gzip,deflate">>},\n {<<"Accept-Language">>,\n <<"fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3">>},\n {<<"Connection">>,<<"keep-alive">>},\n {<<"Host">>,<<"localhost:5984">>},\n {<<"Keep-Alive">>,<<"300">>},\n {<<"User-Agent">>,\n <<"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9.0.11) Gecko/2009060214 Firefox/3.0.11">>}]}},\n {<<"body">>,undefined},\n {<<"form">>,{[]}},\n {<<"cookie">>,{[]}}]}]},\n infinity]}"}
It is admittedly not part of the JSON spec, but I would suggest that .json files be permitted to contain comments in the javascript style.
PROBLEM:
C:\stux> couchapp generate test
Traceback (most recent call last):
File "C:\dev\RAD\Tools\Python25\Scripts\couchapp-script.py", line 8, in
load_entry_point('couchapp==0.3.1', 'console_scripts', 'couchapp')()
File "c:\dev\rad\tools\python25\lib\site-packages\couchapp-0.3.1-py2.5.egg\couchapp\bin\couchapp_cli.py", line 125, in main
cli = CouchappCli(options.verbose)
File "c:\dev\rad\tools\python25\lib\site-packages\couchapp-0.3.1-py2.5.egg\couchapp\bin\couchapp_cli.py", line 37, in init
self.ui = UI(verbose=verbose, logging_handler=console)
File "c:\dev\rad\tools\python25\lib\site-packages\couchapp-0.3.1-py2.5.egg\couchapp\ui.py", line 42, in init
self.readconfig(rcpath())
File "c:\dev\rad\tools\python25\lib\site-packages\couchapp-0.3.1-py2.5.egg\couchapp\utils.py", line 76, in rcpath
_rcpath = user_rcpath()
File "c:\dev\rad\tools\python25\lib\site-packages\couchapp-0.3.1-py2.5.egg\couchapp\utils.py", line 52, in user_rcpath
path.append(os.path.join(userprofile, '.couchapprc'))
AttributeError: 'str' object has no attribute 'append'
C:\stux>
ENVIRONMENT:
C:\stux>python
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
SOLUTION:
Here's the patch that works for me:
*** couchapp\utils.py Wed Jun 10 09:29:17 2009
--- couchapp\utils.py.changed Wed Jun 10 09:30:26 2009
***************
*** 49,55 ****
path = os.path.join(home, '.couchapprc')
userprofile = [os.environ.get('USERPROFILE')]
if userprofile:
! path.append(os.path.join(userprofile, '.couchapprc'))
return path
else:
def user_rcpath():
--- 49,55 ----
path = os.path.join(home, '.couchapprc')
userprofile = [os.environ.get('USERPROFILE')]
if userprofile:
! path = os.path.join(userprofile, '.couchapprc')
return path
else:
def user_rcpath():
shouldnt that read couchapp push . http://localhost:5984/mydb ?
i had a problem with pushing my app, cause i have such files in app root:
couchapp.json
and
couchapp.json~
just put
for name in os.listdir(current_dir): name = name.rstrip("~") ...
at the begining of dir_to_fields in locadoc.py
If a document ending in .json is loaded using !json, it should be validated as being valid JSON markup.
I had a large object that had one instance of ; instead of : ... and couchdb silently loaded the markup as a string value.
Hi
I followed the instructions in the wiki to generate a test application. The procedure completed successfully; but when I point my browser to the server:
http://tulligweb:5984/mytestapp/_design/test/index.html
I get this error message:
{"error":"not_found","reason":"Document is missing attachment"}
Running curl http://tulligweb:5984/mytestapp/_design/test seems to return the app OK.
Regards
Installing on Debian Lenny getting syntax error
File "/usr/src/Python-2.7.3/build/couchapp/setup.py", line 149
with open(os.path.join(os.path.dirname(file), 'README.rst')) as f:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
/usr/src/Python-2.7.3/build/couchapp/setup.py:149: Warning: 'with' will become a reserved keyword in Python 2.6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.