Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2014-09-12 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
--+
 Reporter:  Rozza |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  closed
Component:  GIS   |  Version:  1.3
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Claude Paroz ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"8f334e55be99ae271d82f9b961a2dc6258487d9c"]:
 {{{
 #!CommitTicketReference repository=""
 revision="8f334e55be99ae271d82f9b961a2dc6258487d9c"
 Fixed #13843 -- Prevented AttributeError during geometry objects deletion
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.4d90574ad7571e172eeceea190d67c6c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2013-08-29 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
--+
 Reporter:  Rozza |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  GIS   |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by tobych):

 Here's the monkey patch we're currently using to work around this:


 {{{
 # https://gist.github.com/tobych/6372218
 # Monkey patch to work around https://code.djangoproject.com/ticket/13843

 import django
 from functools import wraps

 def discard_exceptions(f):
   @wraps(f)
   def wrapper(*args, **kwds):
 try:
   f(*args, **kwds)
 except (AttributeError, TypeError):
   pass
   return wrapper

 django.contrib.gis.geos.prototypes.threadsafe.GEOSContextHandle.__del__ =
 \
 
discard_exceptions(django.contrib.gis.geos.prototypes.threadsafe.GEOSContextHandle.__del__)
 django.contrib.gis.geos.prototypes.io.IOBase.__del__ = \
   discard_exceptions(django.contrib.gis.geos.prototypes.io.IOBase.__del__)
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.40922810e3705f79f2328eaa11c20afb%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2013-08-02 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
--+
 Reporter:  Rozza |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  GIS   |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by danols):

 * cc: ognajd@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.ccdffa024233202729e5a0545ecc61e4%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2012-01-30 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
--+
 Reporter:  Rozza |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  reopened
Component:  GIS   |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by gorodechnyj):

 I kept getting my apache error.log flooded with this useless errors:

 {{{
 [Mon Jan 30 15:16:27 2012] [error] Exception AttributeError: "'NoneType'
 object has no attribute 'finishGEOS_r'" in > ignored
 }}}

 Although I'm pretty sure that I never use module-level GEOS variables.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2011-10-16 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
--+
 Reporter:  Rozza |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  reopened
Component:  GIS   |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by aaugustin):

 * needs_better_patch:  0 => 1
 * has_patch:  0 => 1
 * type:  Uncategorized => Cleanup/optimization
 * needs_tests:  1 => 0
 * stage:  Unreviewed => Accepted


Comment:

 I've encountered this problem myself. Log noise is annoying.

 The discussion quoted in comment 3 describes how to resolve it:
 > the developer may prevent  these errors by _not_ creating module-level
 globals of GEOS geometry object

 That's what we should do (if possible).

 The problem described in comment 6 is unrelated.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2011-10-14 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
---+--
 Reporter:  Rozza  |Owner:  nobody
 Type:  Uncategorized  |   Status:  reopened
Component:  GIS|  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  1  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by anonymous):

 ok. this happens when running on apache/mod_wsgi and doesn't happen when
 launched as standalone django server (development mode in Eclipse)

 {{{
 Environment:


 Request Method: POST
 Request URL: http://localhost.com/admin/world/worldborder/239/

 Django Version: 1.3.1
 Python Version: 2.7.1
 Installed Applications:
 ['localeurl',
  'django.contrib.admin',
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.sites',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  'django.contrib.gis',
  'login',
  'mainpage',
  'classifiers',
  'currency_rates',
  'exchange_points',
  'world',
  'south']
 Installed Middleware:
 ('django.middleware.cache.UpdateCacheMiddleware',
  'localeurl.middleware.LocaleURLMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.middleware.csrf.CsrfViewMiddleware',
  'django.middleware.csrf.CsrfResponseMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.messages.middleware.MessageMiddleware',
  'django.middleware.transaction.TransactionMiddleware',
  'django.middleware.cache.FetchFromCacheMiddleware')


 Traceback:
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/core/handlers/base.py" in get_response
   111. response = callback(request,
 *callback_args, **callback_kwargs)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/contrib/admin/options.py" in wrapper
   307. return self.admin_site.admin_view(view)(*args,
 **kwargs)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/utils/decorators.py" in _wrapped_view
   93. response = view_func(request, *args, **kwargs)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/views/decorators/cache.py" in _wrapped_view_func
   79. response = view_func(request, *args, **kwargs)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/contrib/admin/sites.py" in inner
   197. return view(request, *args, **kwargs)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/utils/decorators.py" in _wrapper
   28. return bound_func(*args, **kwargs)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/utils/decorators.py" in _wrapped_view
   93. response = view_func(request, *args, **kwargs)
 File "/usr/local/src/virtualenvs/rates.bixority.com/lib/python2.7/site-
 packages/django/utils/decorators.py" in bound_func
   24. return func(self, *args2, **kwargs2)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/db/transaction.py" in inner
   217. res = func(*args, **kwargs)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/contrib/admin/options.py" in change_view
   982. self.save_model(request, new_object, form,
 change=True)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/contrib/admin/options.py" in save_model
   665. obj.save()
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/db/models/base.py" in save
   460. self.save_base(using=using, force_insert=force_insert,
 force_update=force_update)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/db/models/base.py" in save_base
   526. rows =
 manager.using(using).filter(pk=pk_val)._update(values)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/db/models/query.py" in _update
   491. return query.get_compiler(self.db).execute_sql(None)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/db/models/sql/compiler.py" in execute_sql
   869. cursor = super(SQLUpdateCompiler,
 self).execute_sql(result_type)
 File "/usr/local/src/virtualenvs/localhost.com/lib/python2.7/site-
 packages/django/db/models/sql/compiler.py" in execute_sql
   735.  

Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2011-10-13 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
---+--
 Reporter:  Rozza  |Owner:  nobody
 Type:  Uncategorized  |   Status:  reopened
Component:  GIS|  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  1  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by anonymous):

 Replying to [comment:4 anonymous]:
 > Replying to [comment:3 kamikaze.is.waiting.you@…]:
 > > Having same problem when editing polygon (from geodjango tutorial of
 World) in admin part.
 > And this doesn't happen every time...

 [Fri Oct 14 01:39:24 2011] [notice] caught SIGTERM, shutting down
 [Fri Oct 14 01:39:24 2011] [error] Exception AttributeError: "'NoneType'
 object has no attribute 'finishGEOS_r'" in > ignored
 [Fri Oct 14 01:39:24 2011] [error] Exception AttributeError: "'NoneType'
 object has no attribute 'finishGEOS_r'" in > ignored
 [Fri Oct 14 01:39:24 2011] [error] Exception AttributeError: "'NoneType'
 object has no attribute 'destroy_geom'" in Exception AttributeError:
 "'NoneType' object has no attribute 'destroy_geom'" in
 [Fri Oct 14 01:39:24 2011] [error] Exception AttributeError: "'NoneType'
 object has no attribute 'destroy_geom'" in Exception AttributeError:
 "'NoneType' object has no attribute 'destroy_geom'" in

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2011-10-13 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
---+--
 Reporter:  Rozza  |Owner:  nobody
 Type:  Uncategorized  |   Status:  reopened
Component:  GIS|  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  1  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by anonymous):

 Replying to [comment:3 kamikaze.is.waiting.you@…]:
 > Having same problem when editing polygon (from geodjango tutorial of
 World) in admin part.
 And this doesn't happen every time...

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2011-10-13 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
---+--
 Reporter:  Rozza  |Owner:  nobody
 Type:  Uncategorized  |   Status:  reopened
Component:  GIS|  Version:  1.3
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  1  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by kamikaze.is.waiting.you@…):

 * status:  closed => reopened
 * severity:   => Normal
 * type:   => Uncategorized
 * needs_tests:  0 => 1
 * version:  1.2 => 1.3
 * easy:   => 0
 * has_patch:  1 => 0
 * ui_ux:   => 0
 * resolution:  wontfix =>


Comment:

 Having same problem when editing polygon (from geodjango tutorial of
 World) in admin part.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2010-07-07 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
-+--
  Reporter:  Rozza   | Owner:  nobody
Status:  closed  | Milestone:
 Component:  GIS |   Version:  1.2   
Resolution:  wontfix |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by Rozza):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 Updated after conversation on the geo_django google group.

 {{{
 #!html
 
 
 The root cause for these problems is the same: the module holding the
 destructor is garbage collected in the dying thread before the geometry
 or I/O object is itself garbage collected (and tries to call the now
 non-existent function).

 To compound the issue, it appears that GC order changes depending on the
 version of Python used, as well as the platform it is running on.  In
 other words, Python 2.7 on Snow Leopard won't show these errors while
 Python 2.5 on Arch Linux will.

 However, for the ticket you opened (#13843), the developer may prevent
 these errors by _not_ creating module-level globals of GEOS geometry
 objects.  Here's an example of a module-level global:


 from django.contrib.gis.geos import GEOSGeometry
 geom = GEOSGeometry('POINT(5 23)')
 def my_view():
 do_something_with(geom)


 Instead of having `geom` defined in the global scope, it would be better
 to have it instantiated in the local scope of the view function instead.

 As it stands I'm -1 on the #13843 patch.  While it reduces log noise
 in your case, it masks that there could be an underlying problem with
 the developer's code.  Regardless, I'm keeping the ticket open because
 absent a technological fix, there should be at least note in the
 documentation on how to avoid it.

 -Justin
 
 
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13843: 'destroy_geom' filling up the apache error logs.

2010-06-28 Thread Django
#13843: 'destroy_geom' filling up the apache error logs.
-+--
  Reporter:  Rozza   | Owner:  nobody
Status:  new | Milestone:
 Component:  GIS |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by Rozza):

  * needs_better_patch:  => 0
  * has_patch:  0 => 1
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Again I have no idea how to test!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.