On Nov 27, 2011, at 6:57 PM, mikech wrote:

> Hi:  I downloaded Pyforums in order to study some code in what looks like a 
> very well done application.  When I try to look at the default index view I 
> get the following error:
> 
> Traceback (most recent call last):
>   File "gluon/restricted.py", line 194, in restricted
>   File "C:\web2py\applications\pyforum\controllers/default.py", line 6, in 
> <module>
>   File "gluon/custom_import.py", line 294, in __call__
>   File "gluon/custom_import.py", line 78, in __call__
> ImportError: No module named json
> 
> Running Version 1.99.2 (2011-09-26 06:55:33) stable

pyforum does: import json

...but json is new in Python 2.6. If you're running <2.6, change import json to 
something like this:

try:
    import json
except ImportError:
    try:
        import simplejson as json
    except:
        import contrib.simplejson as json

...and send a patch to pyforum.

Reply via email to