Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-05 Thread NoviceSortOf
.html.
>>
>> NOW ! -- That is an issue I can far more easily debug. 
>>
>> Also I've found out in the last half hour with the development server 
>> issuing...
>>
>> # python -Wall manage.py runserver 0.0.0.0:8000
>>
>> provides more granular details regarding depreciated components, a big 
>> help.
>>
>> Thanks Matt & Daniel, 
>>
>> While I'm not completely out of the woods yet with this port/upgrade at 
>> least I'm moving towards someplace 
>> where traceback is pointing more and more to 'my' code, which if I coded 
>> it I can more easily update/mod/fix.
>>
>> Otherwise if anyone can point me to information, guides, blogs on porting 
>> from 1.1 to 1.6 please let me know. I've already reviewed the depreciation 
>> memos on the Django site from 1.1 to 1.6, and made note of relevant 
>> changes, but further materials could help.
>>
>> Thanks 
>>
>>
>> On Friday, December 2, 2016 at 6:05:52 PM UTC+1, Matthew Pava wrote:
>>>
>>> For what it’s worth, I do get this error sometimes when I am running the 
>>> development server, even in Python 3.5 and Django 1.10.  But because it’s 
>>> the development server, I simply disregard it.
>>>
>>> I typically only get this message when I am running several AJAX calls 
>>> very close together.  (e.g. When I am filling out an autocomplete that 
>>> queries the server after every key press.)
>>>
>>>  
>>>
>>> Seeing the error message, though, I wonder if it would be so hard to 
>>> simply check if self.status is None before executing the command.
>>>
>>>  
>>>
>>>
>>> ****************************
>>>
>>>   File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 33, in close
>>>
>>>self.status.split(' ',1)[0], self.bytes_sent
>>>
>>>AttributeError: 'NoneType' object has no attribute 'split'
>>>
>>>
>>> 
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> *From:* django...@googlegroups.com [mailto:django...@googlegroups.com] *On 
>>> Behalf Of *NoviceSortOf
>>> *Sent:* Friday, December 2, 2016 10:58 AM
>>> *To:* Django users
>>> *Subject:* Re: wsgiref - When does the complexity of question require 
>>> posting to the Developers or other forums?
>>>
>>>  
>>>
>>> Thanks for the reply.
>>>
>>> I agree the probability of this being a bug in Django is improbable 
>>> still I found git hub django 
>>>
>>> bug descriptions/discussions which URLs are listed in previous posts. 
>>> Both of those URLs
>>>
>>> listed patches to fix the situation, not directly in Django but in the 
>>> WsgiRef component. 
>>>
>>> https://github.com/django/django/commit/2f615b10e6330d27dccbd770a4628200044acf70
>>>
>>> https://github.com/django/django/commit/742ea51413b3aab07c6afbfd1d52c1908ffcb510
>>>
>>> I naturally referred to them being as could not find after search of the 
>>> internet or this forum any further info.
>>>
>>>
>>> It would be better if traceback pointed to my code but instead Traceback 
>>> now points to 
>>>
>>> /usr/lib/python2.7/site-packages/django/core/handlers/base.py
>>>
>>> with the same attribute error. 'NoneType' object has no attribute 
>>> 'render'.
>>> (SEE Traceback below)
>>>
>>> With so much of this troubleshooting being in finding the right 
>>> question. 
>>>
>>> * Would issue perhaps be limited to Django’s built-in development server?
>>>
>>> * Would using a difference Web Interface Gateway solution solve the 
>>> problem?
>>>
>>> Details follow...
>>>
>>> Please advise  
>>>
>>>
>>> I type on the Linux server command line
>>> # python manage.py runserver 0.0.0.0:8000
>>>
>>> then point my browser to...
>>> http://[MyDevelopmentServerIP]:8000/
>>>
>>> And get the following response.
>>>
>>>  
>>>
>>> 1 <http://dpaste.com/3AKE6QZ#line-1>
>>>
>>>  2 <http://dpaste.com/3AKE6QZ#line-2>
>

Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-04 Thread Derek

This may be "off topic" - so feel free to disregard! - but why "blogs on 
porting from 1.1 to 1.6"?  If you are in the process of upgrading, then why 
not keep going to at least 1.8, which is the oldest version still receiving 
patches and support?

Some blogs are:

* https://www.caktusgroup.com/blog/2014/07/07/tips-upgrading-django/
* 
http://blog.truantibexes.com/2016/01/19/2-5-years-5-developers-1-django-upgrade/
* 
https://www.seedinvest.com/labs/backend/upgrading-from-django-1-4-to-django-1-7
* http://andrewsforge.com/presentation/upgrading-django-to-17/ (Massive  4 
part series ... assume you want to keep going beyond 1.6)

On Friday, 2 December 2016 19:40:28 UTC+2, NoviceSortOf wrote:
>
> ...Thanks everyone for the above discussion -- some progress today has 
> been noted...
>
> To answer Matt's question...
>
> The variable at the root of the error appears to be -- response.
> as found in /usr/lib/python2.7/site-packages/django/core/handlers/base.py 
> line 89
>
> response is assigned as "None" in the code, before being passed to the 
> middleware method.
>
> The patch I found on github recommended adding these lines to base.py at 
> line 94.
> #response = response.render()
> #response_is_rendered = True
> Now mysteriously enough when commenting those lines out.
> and loading devel server URL via port 8000...
> I get a TemplateDoesNotExist at / index.html.
>
> NOW ! -- That is an issue I can far more easily debug. 
>
> Also I've found out in the last half hour with the development server 
> issuing...
>
> # python -Wall manage.py runserver 0.0.0.0:8000
>
> provides more granular details regarding depreciated components, a big 
> help.
>
> Thanks Matt & Daniel, 
>
> While I'm not completely out of the woods yet with this port/upgrade at 
> least I'm moving towards someplace 
> where traceback is pointing more and more to 'my' code, which if I coded 
> it I can more easily update/mod/fix.
>
> Otherwise if anyone can point me to information, guides, blogs on porting 
> from 1.1 to 1.6 please let me know. I've already reviewed the depreciation 
> memos on the Django site from 1.1 to 1.6, and made note of relevant 
> changes, but further materials could help.
>
> Thanks 
>
>
> On Friday, December 2, 2016 at 6:05:52 PM UTC+1, Matthew Pava wrote:
>>
>> For what it’s worth, I do get this error sometimes when I am running the 
>> development server, even in Python 3.5 and Django 1.10.  But because it’s 
>> the development server, I simply disregard it.
>>
>> I typically only get this message when I am running several AJAX calls 
>> very close together.  (e.g. When I am filling out an autocomplete that 
>> queries the server after every key press.)
>>
>>  
>>
>> Seeing the error message, though, I wonder if it would be so hard to 
>> simply check if self.status is None before executing the command.
>>
>>  
>>
>>
>> 
>>
>>   File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 33, in close
>>
>>self.status.split(' ',1)[0], self.bytes_sent
>>
>>AttributeError: 'NoneType' object has no attribute 'split'
>>
>>
>> 
>>
>>  
>>
>>  
>>
>>  
>>
>>  
>>
>> *From:* django...@googlegroups.com [mailto:django...@googlegroups.com] *On 
>> Behalf Of *NoviceSortOf
>> *Sent:* Friday, December 2, 2016 10:58 AM
>> *To:* Django users
>> *Subject:* Re: wsgiref - When does the complexity of question require 
>> posting to the Developers or other forums?
>>
>>  
>>
>> Thanks for the reply.
>>
>> I agree the probability of this being a bug in Django is improbable still 
>> I found git hub django 
>>
>> bug descriptions/discussions which URLs are listed in previous posts. 
>> Both of those URLs
>>
>> listed patches to fix the situation, not directly in Django but in the 
>> WsgiRef component. 
>>
>> https://github.com/django/django/commit/2f615b10e6330d27dccbd770a4628200044acf70
>>
>> https://github.com/django/django/commit/742ea51413b3aab07c6afbfd1d52c1908ffcb510
>>
>> I naturally referred to them being as could not find after search of the 
>> internet or this forum any further info.
>>
>>
>> It would be better if traceback pointed to my code but instead Traceback 
>> now points to 
>>

Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-02 Thread NoviceSortOf
...Thanks everyone for the above discussion -- some progress today has been 
noted...

To answer Matt's question...

The variable at the root of the error appears to be -- response.
as found in /usr/lib/python2.7/site-packages/django/core/handlers/base.py 
line 89

response is assigned as "None" in the code, before being passed to the 
middleware method.

The patch I found on github recommended adding these lines to base.py at 
line 94.
#response = response.render()
#response_is_rendered = True
Now mysteriously enough when commenting those lines out.
and loading devel server URL via port 8000...
I get a TemplateDoesNotExist at / index.html.

NOW ! -- That is an issue I can far more easily debug. 

Also I've found out in the last half hour with the development server 
issuing...

# python -Wall manage.py runserver 0.0.0.0:8000

provides more granular details regarding depreciated components, a big help.

Thanks Matt & Daniel, 

While I'm not completely out of the woods yet with this port/upgrade at 
least I'm moving towards someplace 
where traceback is pointing more and more to 'my' code, which if I coded it 
I can more easily update/mod/fix.

Otherwise if anyone can point me to information, guides, blogs on porting 
from 1.1 to 1.6 please let me know. I've already reviewed the depreciation 
memos on the Django site from 1.1 to 1.6, and made note of relevant 
changes, but further materials could help.

Thanks 


On Friday, December 2, 2016 at 6:05:52 PM UTC+1, Matthew Pava wrote:
>
> For what it’s worth, I do get this error sometimes when I am running the 
> development server, even in Python 3.5 and Django 1.10.  But because it’s 
> the development server, I simply disregard it.
>
> I typically only get this message when I am running several AJAX calls 
> very close together.  (e.g. When I am filling out an autocomplete that 
> queries the server after every key press.)
>
>  
>
> Seeing the error message, though, I wonder if it would be so hard to 
> simply check if self.status is None before executing the command.
>
>  
>
>
> 
>
>   File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 33, in close
>
>self.status.split(' ',1)[0], self.bytes_sent
>
>AttributeError: 'NoneType' object has no attribute 'split'
>
>
> 
>
>  
>
>  
>
>  
>
>  
>
> *From:* django...@googlegroups.com  [mailto:
> django...@googlegroups.com ] *On Behalf Of *NoviceSortOf
> *Sent:* Friday, December 2, 2016 10:58 AM
> *To:* Django users
> *Subject:* Re: wsgiref - When does the complexity of question require 
> posting to the Developers or other forums?
>
>  
>
> Thanks for the reply.
>
> I agree the probability of this being a bug in Django is improbable still 
> I found git hub django 
>
> bug descriptions/discussions which URLs are listed in previous posts. Both 
> of those URLs
>
> listed patches to fix the situation, not directly in Django but in the 
> WsgiRef component. 
>
> https://github.com/django/django/commit/2f615b10e6330d27dccbd770a4628200044acf70
>
> https://github.com/django/django/commit/742ea51413b3aab07c6afbfd1d52c1908ffcb510
>
> I naturally referred to them being as could not find after search of the 
> internet or this forum any further info.
>
>
> It would be better if traceback pointed to my code but instead Traceback 
> now points to 
>
> /usr/lib/python2.7/site-packages/django/core/handlers/base.py
>
> with the same attribute error. 'NoneType' object has no attribute 'render'.
> (SEE Traceback below)
>
> With so much of this troubleshooting being in finding the right question. 
>
> * Would issue perhaps be limited to Django’s built-in development server?
>
> * Would using a difference Web Interface Gateway solution solve the 
> problem?
>
> Details follow...
>
> Please advise  
>
>
> I type on the Linux server command line
> # python manage.py runserver 0.0.0.0:8000
>
> then point my browser to...
> http://[MyDevelopmentServerIP]:8000/
>
> And get the following response.
>
>  
>
> 1 <http://dpaste.com/3AKE6QZ#line-1>
>
>  2 <http://dpaste.com/3AKE6QZ#line-2>
>
>  3 <http://dpaste.com/3AKE6QZ#line-3>
>
>  4 <http://dpaste.com/3AKE6QZ#line-4>
>
> * 5* <http://dpaste.com/3AKE6QZ#line-5>
>
>  6 <http://dpaste.com/3AKE6QZ#line-6>
>
>  7 <http://dpaste.com/3AKE6QZ#line-7>
>
>  8 <http://dpaste.com/3AKE6QZ#line-8>
>
>  9 <ht

RE: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-02 Thread Matthew Pava
For what it’s worth, I do get this error sometimes when I am running the 
development server, even in Python 3.5 and Django 1.10.  But because it’s the 
development server, I simply disregard it.
I typically only get this message when I am running several AJAX calls very 
close together.  (e.g. When I am filling out an autocomplete that queries the 
server after every key press.)

Seeing the error message, though, I wonder if it would be so hard to simply 
check if self.status is None before executing the command.


  File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 33, in close
   self.status.split(' ',1)[0], self.bytes_sent
   AttributeError: 'NoneType' object has no attribute 'split'





From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of NoviceSortOf
Sent: Friday, December 2, 2016 10:58 AM
To: Django users
Subject: Re: wsgiref - When does the complexity of question require posting to 
the Developers or other forums?

Thanks for the reply.
I agree the probability of this being a bug in Django is improbable still I 
found git hub django
bug descriptions/discussions which URLs are listed in previous posts. Both of 
those URLs
listed patches to fix the situation, not directly in Django but in the WsgiRef 
component.
https://github.com/django/django/commit/2f615b10e6330d27dccbd770a4628200044acf70
https://github.com/django/django/commit/742ea51413b3aab07c6afbfd1d52c1908ffcb510

I naturally referred to them being as could not find after search of the 
internet or this forum any further info.

It would be better if traceback pointed to my code but instead Traceback now 
points to
/usr/lib/python2.7/site-packages/django/core/handlers/base.py
with the same attribute error. 'NoneType' object has no attribute 'render'.
(SEE Traceback below)

With so much of this troubleshooting being in finding the right question.
* Would issue perhaps be limited to Django’s built-in development server?
* Would using a difference Web Interface Gateway solution solve the problem?

Details follow...

Please advise


I type on the Linux server command line
# python manage.py runserver 0.0.0.0:8000
then point my browser to...
http://[MyDevelopmentServerIP]:8000/
And get the following response.


1<http://dpaste.com/3AKE6QZ#line-1>

 2<http://dpaste.com/3AKE6QZ#line-2>

 3<http://dpaste.com/3AKE6QZ#line-3>

 4<http://dpaste.com/3AKE6QZ#line-4>

 5<http://dpaste.com/3AKE6QZ#line-5>

 6<http://dpaste.com/3AKE6QZ#line-6>

 7<http://dpaste.com/3AKE6QZ#line-7>

 8<http://dpaste.com/3AKE6QZ#line-8>

 9<http://dpaste.com/3AKE6QZ#line-9>

10<http://dpaste.com/3AKE6QZ#line-10>

11<http://dpaste.com/3AKE6QZ#line-11>

12<http://dpaste.com/3AKE6QZ#line-12>

13<http://dpaste.com/3AKE6QZ#line-13>

14<http://dpaste.com/3AKE6QZ#line-14>

15<http://dpaste.com/3AKE6QZ#line-15>

16<http://dpaste.com/3AKE6QZ#line-16>

17<http://dpaste.com/3AKE6QZ#line-17>

18<http://dpaste.com/3AKE6QZ#line-18>

19<http://dpaste.com/3AKE6QZ#line-19>

20<http://dpaste.com/3AKE6QZ#line-20>

21<http://dpaste.com/3AKE6QZ#line-21>

22<http://dpaste.com/3AKE6QZ#line-22>

23<http://dpaste.com/3AKE6QZ#line-23>

24<http://dpaste.com/3AKE6QZ#line-24>

25<http://dpaste.com/3AKE6QZ#line-25>

26<http://dpaste.com/3AKE6QZ#line-26>

27<http://dpaste.com/3AKE6QZ#line-27>

28<http://dpaste.com/3AKE6QZ#line-28>

29<http://dpaste.com/3AKE6QZ#line-29>

30<http://dpaste.com/3AKE6QZ#line-30>

31<http://dpaste.com/3AKE6QZ#line-31>

32<http://dpaste.com/3AKE6QZ#line-32>

33<http://dpaste.com/3AKE6QZ#line-33>

34<http://dpaste.com/3AKE6QZ#line-34>

35<http://dpaste.com/3AKE6QZ#line-35>

36<http://dpaste.com/3AKE6QZ#line-36>

37<http://dpaste.com/3AKE6QZ#line-37>

38<http://dpaste.com/3AKE6QZ#line-38>

39<http://dpaste.com/3AKE6QZ#line-39>


Environment:





Request Method: GET

Request URL: http://MyServer:8000/



Django Version: 1.6.12

Python Version: 2.7.5

Installed Applications:

('django.contrib.auth',

 'django.contrib.contenttypes',

 'django.contrib.sessions',

 'django.contrib.sites',

 'django.contrib.admin',

 'django.contrib.humanize',

 'django.contrib.redirects',

 'bookstor.books',

 'bookstor.registration',

 'bookstor.profiles',

 'django_extensions',

 'django.contrib.admin',

 'bookstor.cart')

Installed Middleware:

('django.middleware.common.CommonMiddleware',

 'django.contrib.sessions.middleware.SessionMiddleware',

 

Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-02 Thread NoviceSortOf
Thanks for the reply.

I agree the probability of this being a bug in Django is improbable still I 
found git hub django 
bug descriptions/discussions which URLs are listed in previous posts. Both 
of those URLs
listed patches to fix the situation, not directly in Django but in the 
WsgiRef component. 
https://github.com/django/django/commit/2f615b10e6330d27dccbd770a4628200044acf70
https://github.com/django/django/commit/742ea51413b3aab07c6afbfd1d52c1908ffcb510

I naturally referred to them being as could not find after search of the 
internet or this forum any further info.

It would be better if traceback pointed to my code but instead Traceback 
now points to 
/usr/lib/python2.7/site-packages/django/core/handlers/base.py
with the same attribute error. 'NoneType' object has no attribute 'render'.
(SEE Traceback below)

With so much of this troubleshooting being in finding the right question. 
* Would issue perhaps be limited to Django’s built-in development server?
* Would using a difference Web Interface Gateway solution solve the problem?

Details follow...

Please advise  


I type on the Linux server command line
# python manage.py runserver 0.0.0.0:8000
then point my browser to...
http://[MyDevelopmentServerIP]:8000/

And get the following response.

1  2  3 
 4  5 
 6  7 
 8  9 
10 11 
12 13 
14 15 
16 17 
18 19 
20 21 
22 23 
24 25 
26 27 
28 29 
30 31 
32 33 
34 35 
36 37 
38 39 


Environment:Request Method: GETRequest URL: http://MyServer:8000/Django 
Version: 1.6.12Python Version: 2.7.5Installed 
Applications:('django.contrib.auth', 'django.contrib.contenttypes', 
'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 
'django.contrib.humanize', 'django.contrib.redirects', 'bookstor.books', 
'bookstor.registration', 'bookstor.profiles', 'django_extensions', 
'django.contrib.admin', 'bookstor.cart')Installed 
Middleware:('django.middleware.common.CommonMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'django.middleware.common.CommonMiddleware', 
'django.middleware.csrf.CsrfViewMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware', 
'django.middleware.transaction.TransactionMiddleware', 
'django.contrib.messages.middleware.MessageMiddleware', 
'django.contrib.redirects.middleware.RedirectFallbackMiddleware')Traceback:File 
"/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 
 94. response = response.render()Exception Type: AttributeError 
at /Exception Value: 'NoneType' object has no attribute 'render'




On Thursday, December 1, 2016 at 7:28:48 PM UTC+1, Daniel Roseman wrote:
>
> On Thursday, 1 December 2016 13:16:07 UTC, NoviceSortOf wrote:
>>
>>
>>
>> Hi All,
>>
>> After hours of looking for solutions, here on Stackoverflow, GitHub, 
>> Django site and other forums,
>> and seeing that at least 2 other posts related to what per web chatter 
>> appears to be a known
>> bug in Django and the WSGI package, I'm wondering where to turn for 
>> useful advice
>> regarding what appears to be a common problem without a common answer.
>>
>> Below is detail of a wsgiref issue that gets considerable discussion 
>> online with
>> no answer to the question being posted here or elsewhere.
>>
>> * Should I attempt posting this question in the Developers Conf?
>> * Are there other forums that might be of help?
>>
>> Please advise 
>>
>>
>>
>> Details of well known Wsgiref bug/issue follow.
>>
>>
>> ***
>> After porting my project to the new development area...
>> When running... 
>>  python manage.p

Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-01 Thread Daniel Roseman
On Thursday, 1 December 2016 13:16:07 UTC, NoviceSortOf wrote:
>
>
>
> Hi All,
>
> After hours of looking for solutions, here on Stackoverflow, GitHub, 
> Django site and other forums,
> and seeing that at least 2 other posts related to what per web chatter 
> appears to be a known
> bug in Django and the WSGI package, I'm wondering where to turn for useful 
> advice
> regarding what appears to be a common problem without a common answer.
>
> Below is detail of a wsgiref issue that gets considerable discussion 
> online with
> no answer to the question being posted here or elsewhere.
>
> * Should I attempt posting this question in the Developers Conf?
> * Are there other forums that might be of help?
>
> Please advise 
>
>
>
> Details of well known Wsgiref bug/issue follow.
>
>
> ***
> After porting my project to the new development area...
> When running... 
>  python manage.py runserver 0.0.0.0:8000
>
> And then loading a page on a browser I get the following.
>
>
> 
>   File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 33, in close
>self.status.split(' ',1)[0], self.bytes_sent
>AttributeError: 'NoneType' object has no attribute 'split'
>
> 
>
> This problem points to the wsgi component of the install packages.
>
> Researching the web various solutions are posted, including ...
>
> --
> * Commenting out line 33 in simple_server.py and see if any missing
>packages are reported.
>(I've tried this and no packages are reported as missing)
>
> REF.:  https://groups.google.com/forum/#!topic/django-users/Cps4kHh0_-0
>
> ---
>
> ---
> * A Django bug report, with code that does not match the version I 
> currently
>   am using. It recommends modifications to file  
>   django/core/handlers /exception.py 
>   which does not exist on the release currently installed.
>
> REF.: 
> https://github.com/django/django/commit/742ea51413b3aab07c6afbfd1d52c1908ffcb510
>
> 
> * A Django modification that makes perfect sense and partially matches the 
> revision of django/core/handlers/base.py on my installed system.
>
> REF.: 
> https://github.com/django/django/commit/2f615b10e6330d27dccbd770a4628200044acf70
>
> -
>
> Still though I continue to get 'NoneType' object has no attribute 'render' 
> or
> other errors related to NoneType assigned as NoneType object when it should
> be a request response object.
>
> *** What to do?
>
> * This appears to be a bug noted in Django, Github and Stackoverflow 
> communities,
>   with Wsgi related to various versions of Django and Python 
>   
>   _Is there any logical way of resolving the NonType error, by settings.py 
> or other
>Django config options?
>   
>   _Would placing my app as the home page on this development server rather 
> than 
>relying on the python manage.py runserver possibly resolve this problem?
>   
>   _Is there an alternative to Wsgi that would possibly eliminate the 
> problem?
>   
>
> Any ideas or suggestions appreciated.
>
>

It seems pretty unlikely that there is a fundamental bug in Django which 
means it cannot serve pages via WSGI; I would imagine that that would have 
been noticed by others, including the core developers, before now.

So it is almost certain that the bug is in your code, which you have not 
shown. You also need to show the full traceback.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d32d891e-2f72-4a2f-b9d4-a158a295293e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-01 Thread NoviceSortOf


Hi All,

After hours of looking for solutions, here on Stackoverflow, GitHub, Django 
site and other forums,
and seeing that at least 2 other posts related to what per web chatter 
appears to be a known
bug in Django and the WSGI package, I'm wondering where to turn for useful 
advice
regarding what appears to be a common problem without a common answer.

Below is detail of a wsgiref issue that gets considerable discussion online 
with
no answer to the question being posted here or elsewhere.

* Should I attempt posting this question in the Developers Conf?
* Are there other forums that might be of help?

Please advise 



Details of well known Wsgiref bug/issue follow.

***
After porting my project to the new development area...
When running... 
 python manage.py runserver 0.0.0.0:8000

And then loading a page on a browser I get the following.


  File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 33, in close
   self.status.split(' ',1)[0], self.bytes_sent
   AttributeError: 'NoneType' object has no attribute 'split'


This problem points to the wsgi component of the install packages.

Researching the web various solutions are posted, including ...
--
* Commenting out line 33 in simple_server.py and see if any missing
   packages are reported.
   (I've tried this and no packages are reported as missing)

REF.:  https://groups.google.com/forum/#!topic/django-users/Cps4kHh0_-0
---
---
* A Django bug report, with code that does not match the version I currently
  am using. It recommends modifications to file  
  django/core/handlers /exception.py 
  which does not exist on the release currently installed.

REF.: 
https://github.com/django/django/commit/742ea51413b3aab07c6afbfd1d52c1908ffcb510

* A Django modification that makes perfect sense and partially matches the 
revision of django/core/handlers/base.py on my installed system.

REF.: 
https://github.com/django/django/commit/2f615b10e6330d27dccbd770a4628200044acf70
-

Still though I continue to get 'NoneType' object has no attribute 'render' 
or
other errors related to NoneType assigned as NoneType object when it should
be a request response object.

*** What to do?

* This appears to be a bug noted in Django, Github and Stackoverflow 
communities,
  with Wsgi related to various versions of Django and Python 
  
  _Is there any logical way of resolving the NonType error, by settings.py 
or other
   Django config options?
  
  _Would placing my app as the home page on this development server rather 
than 
   relying on the python manage.py runserver possibly resolve this problem?
  
  _Is there an alternative to Wsgi that would possibly eliminate the 
problem?
  

Any ideas or suggestions appreciated.

  
  

  


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4be17192-d031-4692-85fe-2ef3a0913e72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.