The lastest trunk, revision 689fb804f2 (2010-06-08), fixed the "communication error" on Ubuntu 10.04.
Here's what I did: 1. Uninstalled simplejson 2.1.1 in Ubuntu using: "sudo easy_install -m simplejson" 2. Confirmed that "communication error" comes back after uninstall. 3. Cloned web2py trunk using: "sudo -u www-data hg clone https://web2py.googlecode.com/hg/ web2py" 4. Confirmed web2py works without "communication error" on Ubuntu 10.04. Thank you for amazing support. I find it interesting that web2py 1.79.1 worked without problems on Windows (even with Python 2.6.5 and web2py 1.79.1 src code version.) On Jun 7, 11:38 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > On Jun 7, 11:30 pm, Salvor Hardin <salvor.pub...@gmail.com> wrote: > > > Thank you! > > > Your suggestion fixed the "communication error" on Ubuntu Server 10.04 > > when saving files using ajax editor. > > > Here are the 3 steps in case you want to cut/paste to FAQ: > > > 1. sudo aptitude install python-setuptools > > 2. sudo easy_install simplejson > > 3. sudo /etc/init.d/apache2 restart > > > Speaking of 3rd-party libraries, I noticed jquery 1.4.2 is > > available :) > > In trunk now. please give it a try. > > > > > > > On Jun 7, 10:43 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > aha. json problem. We upgraded to the latest simplejson. Yo may have > > > an older version installed in your system that is conflicting with > > > it. > > > > user easy_install to upgrade simplejson > > > > On Jun 7, 9:21 pm, Salvor Hardin <salvor.pub...@gmail.com> wrote: > > > > > I'm sorry, I looked in the wrong directory and made a mistake with > > > > Firebug. > > > > > I found this in admin/errors/ and hope you find it useful: > > > > > Traceback (most recent call last): > > > > File "gluon/restricted.py", line 178, in restricted > > > > exec ccode in environment > > > > File "/srv/web2py/applications/admin/controllers/default.py", line > > > > 1060, in <module> > > > > File "gluon/globals.py", line 96, in <lambda> > > > > self._caller = lambda f: f() > > > > File "/srv/web2py/applications/admin/controllers/default.py", line > > > > 404, in edit > > > > return response.json({'file_hash': file_hash, 'saved_on': > > > > saved_on, 'functions':functions, 'controller': controller, > > > > 'application': request.args[0] }) > > > > File "gluon/globals.py", line 203, in json > > > > return json(data) > > > > File "gluon/serializers.py", line 29, in json > > > > return simplejson.dumps(value) > > > > File "gluon/contrib/simplejson/__init__.py", line 228, in dumps > > > > return _default_encoder.encode(obj) > > > > File "gluon/contrib/simplejson/encoder.py", line 229, in encode > > > > chunks = self.iterencode(o, _one_shot=True) > > > > File "gluon/contrib/simplejson/encoder.py", line 290, in iterencode > > > > self.skipkeys, self.allow_nan, key_memo, self.use_decimal) > > > > TypeError: make_encoder() takes at most 9 arguments (11 given) > > > > > On Jun 7, 1:04 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > > try the following. delete all your tickets app/errors/* > > > > > reproduce the problem and see if you find a new ticket file. If so, > > > > > please email it to me. > > > > > > On Jun 7, 12:43 pm, Salvor Hardin <salvor.pub...@gmail.com> wrote: > > > > > > > Here's what I tried: > > > > > > > * I setup SSH tunnel from my Vista desktop's localhost:8080 to > > > > > > ubuntu.private.lan:80. > > > > > > * I modified Apache2's <virtualhost *:80> to enable access to > > > > > > /admin > > > > > > > The new non-HTTPS, ssh-tunneled, remote URL to ubuntu.private.lan > > > > > > is: > > > > > > > > > > > > > http://localhost:8080/admin/default/edit/myblog/views/default/index.html > > > > > > > I got same problem again on Firefox and Chrome. Files get saved > > > > > > successfully, but "Last Saved On" field shows "communication error" > > > > > > in > > > > > > red background color every time I click Save button. > > > > > > > Next, I'll try using Rocket on Ubuntu, just for debugging this > > > > > > problem. Rocket won't be approved for production servers here (this > > > > > > summer), so I hope we can find a solution using Apache 2.2.14. > > > > > > > On Jun 7, 11:58 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > > > > Does it work without ssl? Which browser are you using? Have you > > > > > > > tried > > > > > > > other browsers? > > > > > > > > Massimo > > > > > > > > On Jun 7, 11:47 am, Salvor Hardin <salvor.pub...@gmail.com> wrote: > > > > > > > > > I'm new to web2py and python (currently evaluating python > > > > > > > > frameworks > > > > > > > > to replace Ruby on Rails on production servers by July 4th > > > > > > > > weekend.) > > > > > > > > > PROBLEM: > > > > > > > > > * Saving a file using the admin interface displays a red > > > > > > > > "communication error" in the "Last Saved On" field. However, > > > > > > > > when I > > > > > > > > click Reload in the browser, a new date and time appears > > > > > > > > correctly so > > > > > > > > the file is successfully saved. > > > > > > > > > I'm using HTTPS (web2py is not running on 127.0.0.1.) > > > > > > > > > SYSTEM: > > > > > > > > * Software: web2py 1.79.1, Python 2.6.5, Apache 2.2.14, > > > > > > > > mod_wsgi 2.8, > > > > > > > > OpenSSL 0.98k, sqlite 3.6.22 > > > > > > > > * Browsers: Latest stable versions of Chrome and Firefox on > > > > > > > > Vista 32- > > > > > > > > bit > > > > > > > > * OS: Ubuntu Server 10.04 LTS guest running in Virtual PC 2007 > > > > > > > > SP1 on > > > > > > > > Vista 32-bit host > > > > > > > > (because Virtual PC 2007 only uses ~16 (sixteen) MB > > > > > > > > RAM for > > > > > > > > actively used Ubuntu Server 10.04 guest setup with 512 MB RAM, > > > > > > > > and because my work desktop is Vista, and I need to > > > > > > > > develop > > > > > > > > web apps on identical OS & packages as the production server > > > > > > > > due to > > > > > > > > policy) > > > > > > > > > CONFIGURATION: > > > > > > > > > I'm using HTTPS, so here's the SSL portion of the Apache2 config > > > > > > > > (ubuntu.private.lan is the dev machine mapped to a LAN address): > > > > > > > > > <VirtualHost *:80> > > > > > > > > ServerName ubuntu.private.lan > > > > > > > > WSGIDaemonProcess web2py user=www-data group=www-data display- > > > > > > > > name=web2py > > > > > > > > ... > > > > > > > > </VirtualHost> > > > > > > > > > <IfModule mod_ssl.c> > > > > > > > > <VirtualHost *:443> > > > > > > > > ServerName ubuntu.private.lan > > > > > > > > > SSLEngine on > > > > > > > > SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem > > > > > > > > SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key > > > > > > > > <FilesMatch "\.(cgi|shtml|phtml|php)$"> > > > > > > > > SSLOptions +StdEnvVars > > > > > > > > </FilesMatch> > > > > > > > > <Directory /usr/lib/cgi-bin> > > > > > > > > SSLOptions +StdEnvVars > > > > > > > > </Directory> > > > > > > > > BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown > > > > > > > > downgrade-1.0 force-response-1.0 > > > > > > > > # MSIE 7 and newer should be able to use keepalive > > > > > > > > BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown > > > > > > > > > # WSGIDaemonProcess defined is under <VirtualHost *:80> as: > > > > > > > > WSGIDaemonProcess web2py user=www-data group=www-data display- > > > > > > > > name=web2py > > > > > > > > WSGIProcessGroup web2py > > > > > > > > WSGIScriptAlias / /srv/web2py/wsgihandler.py > > > > > > > > > <Directory /srv/web2py> > > > > > > > > AllowOverride None > > > > > > > > Order Allow,Deny > > > > > > > > Deny from all > > > > > > > > <Files wsgihandler.py> > > > > > > > > Allow from all > > > > > > > > </Files> > > > > > > > > </Directory> > > > > > > > > > AliasMatch ^/([^/]+)/static/(.*) \ > > > > > > > > /srv/web2py/applications/$1/static/$2 > > > > > > > > > <Directory /srv/web2py/applications/*/static/> > > > > > > > > Order Allow,Deny > > > > > > > > Allow from all > > > > > > > > </Directory> > > > > > > > > > CustomLog /var/log/apache2/access.log common > > > > > > > > ErrorLog /var/log/apache2/error.log > > > > > > > > > </VirtualHost> > > > > > > > > </IfModule>