Re: [web2py] Error in custom_import and Pyforum

2011-11-28 Thread mikech
Thanks, this must be it.  I'm running under 2.5 using the web2py standard 
binary distribution.  

Mike


Re: [web2py] Error in custom_import and Pyforum

2011-11-28 Thread Jonathan Lundell
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 
> 
>   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.

Re: [web2py] Error in custom_import and Pyforum

2011-11-28 Thread Martín Mulone
I think you need json module installed on your system. You are under
windows, linux, ?. In ubuntu linux you can install it from console
doing: apt-get
install python-simplejson

2011/11/27 mikech 

> 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:
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
>
> Traceback (most recent call last):
>   File "gluon/restricted.py", line 194, in restricted
>   File "C:\web2py\applications\pyforum\controllers/default.py", line 6, in 
> 
>   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
>
>


-- 
 http://martin.tecnodoc.com.ar


[web2py] Error in custom_import and Pyforum

2011-11-27 Thread mikech
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:

1.
2.
3.
4.
5.
6.
7.

Traceback (most recent call last):
  File "gluon/restricted.py", line 194, in restricted
  File "C:\web2py\applications\pyforum\controllers/default.py", line 6, in 

  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