我已经提出了a question about this a few days ago。我想这个问题没有被注意到,但是这种行为真的很奇怪,所以我试图将它简化为更简单的元素并再次询问。
请看这个追溯:
Traceback (most recent call last):
File "/home/m2user/webapps/enea/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 114, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/m2user/webapps/enea/local/lib/python2.7/site-packages/django/utils/decorators.py", line 99, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/home/m2user/webapps/enea/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
File "/home/m2user/webapps/enea/local/lib/python2.7/site-packages/django/utils/decorators.py", line 29, in _wrapper
return bound_func(*args, **kwargs)
File "/home/m2user/webapps/enea/local/lib/python2.7/site-packages/django/utils/decorators.py", line 99, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/home/m2user/webapps/enea/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in bound_func
return func(self, *args2, **kwargs2)
File "/home/m2user/webapps/enea/src/django-geojson/djgeojson/views.py", line 51, in dispatch
return super(GeoJSONLayerView, self).dispatch(*args, **kwargs)
File "/home/m2user/webapps/enea/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
return handler(request, *args, **kwargs)
File "/home/m2user/webapps/enea/local/lib/python2.7/site-packages/django/views/generic/list.py", line 153, in get
return self.render_to_response(context)
File "/home/m2user/webapps/enea/src/django-geojson/djgeojson/views.py", line 41, in render_to_response
**options)
File "/home/m2user/webapps/enea/src/django-geojson/djgeojson/serializers.py", line 335, in serialize
self.serialize_object_list(queryset)
File "/home/m2user/webapps/enea/src/django-geojson/djgeojson/serializers.py", line 277, in serialize_queryset
self.start_object(obj)
File "/home/m2user/webapps/enea/src/django-geojson/djgeojson/serializers.py", line 177, in handle_field
if value is not None:
File "/home/m2user/webapps/enea/src/django-geojson/djgeojson/serializers.py", line 159, in _handle_geom
#logger.warn('%s != '%(self.srid, geometry.srid))
File "/home/m2user/webapps/enea/local/lib/python2.7/site-packages/django/contrib/gis/geos/geometry.py", line 510, in transform
raise GEOSException("Calling transform() with no SRID set is not supported")
第159行怎么会产生这样的错误?这是评论!
到目前为止尝试了什么:
在查询生成此错误的视图之前,我删除了所有.pyc
个文件并重新启动了gunicorn。在源代码(django-geojson lib)中,没有对transform()
函数的其他调用(我对它们进行了全部注释)。
任何想法?
更新 通过卸载然后重新安装所有库(作为ubuntu软件包),python解释器,所有代码,通过重新生成数据库(包括重新安装postgis)然后完全重启nginx(和因此枪炮)。但是,没有库更新,所以我仍然不明白究竟发生了什么。