Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
'NoneType' object is not iterable
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Javi  
View profile  
 More options Nov 4 2008, 12:35 pm
From: Javi <JavierPe...@gmail.com>
Date: Tue, 4 Nov 2008 09:35:06 -0800 (PST)
Local: Tues, Nov 4 2008 12:35 pm
Subject: 'NoneType' object is not iterable
Hello everybody!
I'm using django 1.0-1 version and Apache as a server web. In the dev
server everything works fine but in the production server I get the
following error when I ask for a url:

NoneType' object is not iterable

Request Method:         POST
Request URL:    http://localhostenter/
Exception Type:         TypeError
Exception Value:

'NoneType' object is not iterable

Exception Location:     /var/lib/python-support/python2.5/django/core/
handlers/base.py in get_response, line 77
Python Executable:      /usr/bin/python
Python Version:         2.5.2

I think it's because the "/" after "localhost" is not added, actually
the url in the browser is http://localhost/enter/

I've been reading about the problem and someone speaks about creating
a middleware class... I don't know...

Is there another simpler way to sort the problem out?

Thanks in advance.

Greetings.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xiong Chiamiov  
View profile  
 More options Nov 4 2008, 1:07 pm
From: Xiong Chiamiov <xiong.chiam...@gmail.com>
Date: Tue, 4 Nov 2008 10:07:11 -0800 (PST)
Local: Tues, Nov 4 2008 1:07 pm
Subject: Re: 'NoneType' object is not iterable
If it works in one environment, but not another, then it might have
something to do with your settings files.  When you create your links,
are you having the href be "/enter" or "/enter/"?  I think the
middleware class you're reading about is for trailing slashes, not
preceeding ones.

On Nov 4, 9:35 am, Javi <JavierPe...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Javi  
View profile  
 More options Nov 4 2008, 4:11 pm
From: Javi <JavierPe...@gmail.com>
Date: Tue, 4 Nov 2008 13:11:13 -0800 (PST)
Local: Tues, Nov 4 2008 4:11 pm
Subject: Re: 'NoneType' object is not iterable
Thanks but I'd already tried it. I don't understand why in the
production server is not added the preceeding slash to the url. My
urls.py is as follows:
urlpatterns = patterns('candidateTool.assessmentSystem.views',
    (r'^$', 'index'),
    (r'^enter/$', 'enter'),
    (r'^main/$', 'main'),
    (r'^exam/(?P<exam_id>\d+)/$', 'exam'),
    (r'^myexam/(?P<exam_id>\d+)/$', 'my_exam'),
    (r'^solved/(?P<exam_id>\d+)/$', 'solved_exam'),
    (r'^report/$', 'report'),
    (r'^exams/$', 'exams'),
    (r'^admin/(.*)', admin.site.root),
)

In the index page is called /enter and I've also tried /enter/ but
neither work :(

On Nov 4, 7:07 pm, Xiong Chiamiov <xiong.chiam...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rajesh Dhawan  
View profile  
 More options Nov 5 2008, 1:11 pm
From: Rajesh Dhawan <rajesh.dha...@gmail.com>
Date: Wed, 5 Nov 2008 10:11:41 -0800 (PST)
Local: Wed, Nov 5 2008 1:11 pm
Subject: Re: 'NoneType' object is not iterable
Hi Javi,

Try, putting FORCE_SCRIPT_NAME='' in your settings file.

Also, how are you running the application in your production server
(Apache/mod_python, lighttpd/flup, nginx/proxy, etc.)?

-RD


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Javi  
View profile  
 More options Nov 10 2008, 5:35 am
From: Javi <JavierPe...@gmail.com>
Date: Mon, 10 Nov 2008 02:35:45 -0800 (PST)
Local: Mon, Nov 10 2008 5:35 am
Subject: Re: 'NoneType' object is not iterable
Hello Rajesh,

I've tried putting FORCE_SCRIPT_NAME="" but everything continues at
the same state. I'm running the app in Apache2/mod_python. I've pasted
the htttp.conf file at http://rafb.net/p/Ya1VKT55.html

I'm going to continue trying to solve it.

On Nov 5, 7:11 pm, Rajesh Dhawan <rajesh.dha...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diego Cibils  
View profile  
 More options Nov 10 2008, 9:07 am
From: Diego Cibils <dcib...@gmail.com>
Date: Mon, 10 Nov 2008 06:07:55 -0800 (PST)
Local: Mon, Nov 10 2008 9:07 am
Subject: Re: 'NoneType' object is not iterable
Hi Javi,

I'm having the same problem... any progress so far?

Thanks.

On Nov 10, 8:35 am, Javi <JavierPe...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zeddy  
View profile  
 More options Nov 11 2008, 3:23 pm
From: Zeddy <nick...@gmail.com>
Date: Tue, 11 Nov 2008 12:23:48 -0800 (PST)
Local: Tues, Nov 11 2008 3:23 pm
Subject: Re: 'NoneType' object is not iterable
Same problem. Any suggestions?

I am using nginx with fapws2 (wsgi server). Looks like script kiddie
thinks that my web server is an open proxy (88.80.7.248 is NOT my IP
address):

Traceback (most recent call last):

  File "/usr/local/lib/python2.5/site-packages/django/core/handlers/
base.py", line 77, in get_response
    request.path_info)

TypeError: 'NoneType' object is not iterable

<WSGIRequest
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{},
META:{'HTTP_ACCEPT': '*/*',
 'HTTP_HOST': '88.80.7.248',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_PROXY_CONNECTION': 'Keep-Alive',
 'PATH_INFO': u'http://88.80.7.248/proxy-pool/set-cookie.php',
 'QUERY_STRING': '',
 'REQUEST_METHOD': 'GET',
 'SCRIPT_NAME': u'',
 'SERVER_NAME': '127.0.0.1',
 'SERVER_PORT': 8080,
 'fapws.http_major': 1,
 'fapws.http_minor': 1,
 'fapws.params': {},
 'fapws.remote_host': '88.80.7.248',
 'fapws.remote_port': 34609,
 'fapws.uri': 'http://88.80.7.248/proxy-pool/set-cookie.php',
 'wsgi.errors': <cStringIO.StringO object at 0x8f58e20>,
 'wsgi.input': <cStringIO.StringO object at 0x8f552e0>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rajesh Dhawan  
View profile  
 More options Nov 11 2008, 5:54 pm
From: Rajesh Dhawan <rajesh.dha...@gmail.com>
Date: Tue, 11 Nov 2008 14:54:42 -0800 (PST)
Local: Tues, Nov 11 2008 5:54 pm
Subject: Re: 'NoneType' object is not iterable
Hi Javi,

> I've tried putting FORCE_SCRIPT_NAME="" but everything continues at
> the same state. I'm running the app in Apache2/mod_python. I've pasted
> the htttp.conf file athttp://rafb.net/p/Ya1VKT55.html

I can't see your conf file there. Perhaps you want to paste again at
http://dpaste.com/ ?

Take a look at the django.root PythonOption described here:

http://docs.djangoproject.com/en/dev/howto/deployment/modpython/?from...

Are you using that option? If, yes, remove that option entirely and
try again.

-Rajesh


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Javi  
View profile  
 More options Nov 12 2008, 5:14 am
From: Javi <JavierPe...@gmail.com>
Date: Wed, 12 Nov 2008 02:14:39 -0800 (PST)
Local: Wed, Nov 12 2008 5:14 am
Subject: Re: 'NoneType' object is not iterable
It works!! Thank you very much!! The django.root PythonOption stripped
the initial "/"

Greetings.

On Nov 11, 11:54 pm, Rajesh Dhawan <rajesh.dha...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »