Here is a fix.
in gluon/contrib/simplejson/encoder.py
def _import_speedups():
try:
+ raise ImportError
from simplejson import _speedups
return _speedups.encode_basestring_ascii,
_speedups.make_encoder
except ImportError:
return None, None
and in gluon/contrib/simplejson/decoder.py
def _import_c_scanstring():
try:
+ raise ImportError
from simplejson._speedups import scanstring
return scanstring
except ImportError:
return None
and in gluon/contrib/simplejson/scanner.py
def _import_c_make_scanner():
try:
+ raise ImportError
from simplejson._speedups import make_scanner
return make_scanner
except ImportError:
return None
c_make_scanner = _import_c_make_scanner()
(add the line starting with +). If this solves the problem I could
push the fix temporarily until a better one is found.
massimo
On Jun 7, 6:52 pm, ron_m <[email protected]> wrote:
> I just started using web2py and am on Ubuntu 10.04 386 Desktop.
> Browser is Firefox and I get this error. Looking for the error tickets
> I found them under the admin user and was making the first mods to the
> db.py file for a connection string to MySQL.
>
> Here is the traceback from the ticket
>
> Error ticket for "admin"
> Ticket
> 127.0.0.1.2010-06-07.16-45-34.99c56d94-2936-4f38-81b4-799f483e2ee6
>
> Error traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
> 17.
> 18.
> 19.
> 20.
>
> Traceback (most recent call last):
> File "/home/ronm/Dev/web2py/gluon/restricted.py", line 178, in
> restricted
> exec ccode in environment
> File "/home/ronm/Dev/web2py/applications/admin/controllers/
> default.py", line 1060, in <module>
> File "/home/ronm/Dev/web2py/gluon/globals.py", line 96, in <lambda>
> self._caller = lambda f: f()
> File "/home/ronm/Dev/web2py/applications/admin/controllers/
> default.py", line 343, in edit
> return response.json({'error': T('file changed on disk'),
> 'redirect': URL(r=request, f='resolve', args=request.args)})
> File "/home/ronm/Dev/web2py/gluon/globals.py", line 203, in json
> return json(data)
> File "/home/ronm/Dev/web2py/gluon/serializers.py", line 29, in json
> return simplejson.dumps(value)
> File "/home/ronm/Dev/web2py/gluon/contrib/simplejson/__init__.py",
> line 228, in dumps
> return _default_encoder.encode(obj)
> File "/home/ronm/Dev/web2py/gluon/contrib/simplejson/encoder.py",
> line 229, in encode
> chunks = self.iterencode(o, _one_shot=True)
> File "/home/ronm/Dev/web2py/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)
>
> In file: /home/ronm/Dev/web2py/applications/admin/controllers/
> default.py
>
> I presume you don't need the applications/admin/controllers/default.py
> file listing.
>
> I installed as myself in a Dev directory, Python is the standard 2.6.5
> install.
>
> Thanks,
>
> Ron