vista 32 位上的 geodjango 访问冲突
我在 geodjango 保存条目时遇到了真正的问题。 它会产生“错误:访问冲突读取 0x??????” 该错误并不表明它正在尝试获取对哪个文件或文件夹的读/写访问权限。
经过研究,我发现其他非 django 程序也有这个问题,有些是通过关闭 Vista 的 DEP 控制器来修复的,但我有点害怕走这条路,我什至不完全确定这是否可以解决问题。
任何人有任何想法......? Vista 的工作简直是一场噩梦。
下面是错误输出: Python 2.5.4(r254:67916,2008 年 12 月 23 日,15:10:54)[MSC v.1310 输入“帮助”、“版权”、“制作人员”或“许可证”以获取更多信息 (交互式控制台)
<块引用> <块引用>从 django.contrib.gis.utils 导入 add_postgis_srs add_postgis_srs(900913) 从 geofencing.models 导入 FencingBorder 从 django.contrib.gis.geos 导入点 il = 击剑边界() il.name = '某个地方' il.兴趣度 = 3 il.geometry = 点(-16.57,14.0) 回溯(最近一次调用最后一次): 文件“”,第 1 行,位于 文件“C:\SWsoft\Plesk\Additional\Python\lib\site-packages\ if isinstance(value, self._klass) 和 (str(value.geom_ty 文件“C:\SWsoft\Plesk\Additional\Python\Lib\site-packages\
return capi.geos_type(self.ptr)
文件“C:\SWsoft\Plesk\Additional\Python\lib\site-packages\ 在通话中 返回 self.cfunc(*args) 文件“C:\SWsoft\Plesk\Additional\Python\lib\site-packages\ 检查字符串 免费(结果) WindowsError:异常:访问冲突读取 0x03C2A964
<块引用> <块引用>il.geometry = 点(-16.57,14.0) 回溯(最近一次调用最后一次): 文件“”,第 1 行,位于 文件“C:\SWsoft\Plesk\Additional\Python\lib\site-packages\ if isinstance(value, self._klass) 和 (str(value.geom_ty 文件“C:\SWsoft\Plesk\Additional\Python\Lib\site-packages\
return capi.geos_type(self.ptr)
文件“C:\SWsoft\Plesk\Additional\Python\lib\site-packages\ 在通话中 返回 self.cfunc(*args) 文件“C:\SWsoft\Plesk\Additional\Python\lib\site-packages\ 检查字符串 免费(结果) WindowsError:异常:访问冲突读取 0x03C2A964
Am having a real problem with the geodjango saving an entry.
It produces a "Error: Access Violation reading 0x???????"
The error does not indicate which file or folder it's trying to gain read/write access to.
Upon researching i found other non-django programs that also have this issue, some were fixed by turning off Vista's DEP controller, but am a bit scared to go down this route and am not even totally sure if this would fix the issue.
Any one got any ideas....?
Vista is a nightmare to work on.
Below is error output:
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310
Type "help", "copyright", "credits" or "license" for more in
(InteractiveConsole)
from django.contrib.gis.utils import add_postgis_srs
add_postgis_srs(900913)
from geofencing.models import FencingBorder
from django.contrib.gis.geos import Point
il = FencingBorder()
il.name = 'some place'
il.interestingness = 3
il.geometry = Point(-16.57,14.0)
Traceback (most recent call last):
File "", line 1, in
File "C:\SWsoft\Plesk\Additional\Python\lib\site-packages\
if isinstance(value, self._klass) and (str(value.geom_ty
File "C:\SWsoft\Plesk\Additional\Python\Lib\site-packages\
return capi.geos_type(self.ptr)
File "C:\SWsoft\Plesk\Additional\Python\lib\site-packages\
in call
return self.cfunc(*args)
File "C:\SWsoft\Plesk\Additional\Python\lib\site-packages\
check_string
free(result)
WindowsError: exception: access violation reading 0x03C2A964
il.geometry = Point(-16.57,14.0)
Traceback (most recent call last):
File "", line 1, in
File "C:\SWsoft\Plesk\Additional\Python\lib\site-packages\
if isinstance(value, self._klass) and (str(value.geom_ty
File "C:\SWsoft\Plesk\Additional\Python\Lib\site-packages\
return capi.geos_type(self.ptr)
File "C:\SWsoft\Plesk\Additional\Python\lib\site-packages\
in call
return self.cfunc(*args)
File "C:\SWsoft\Plesk\Additional\Python\lib\site-packages\
check_string
free(result)
WindowsError: exception: access violation reading 0x03C2A964
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正确的
万一其他人遇到这个问题..
问题出在以下引用的文档上:
http://code.google.com/p/geodjango-basic-apps /wiki/FOSS4GWorkshop
如果您从二进制安装 GDAL 或安装 PostgreSQL 9.0
不要在 settings.py 中引用 GDAL dll 文件。
始终在 Windows 系统的 PATH 中设置 VARIABLE_DEFINITION。
罪魁祸首是settings.py中的这个:
GEOS_LIBRARY_PATH='c:\geodjango\gdal\bin\geos_c_fw.dll'
Right
In case anyone else ever has the issue..
The problem was following a doc referenced at:
http://code.google.com/p/geodjango-basic-apps/wiki/FOSS4GWorkshop
if you install GDAL from binary or install PostgreSQL 9.0
DO NOT reference the GDAL dll file in your settings.py.
Always go with setting the VARIABLE_DEFINITION in windows system's PATH.
The culprit was this in settings.py:
GEOS_LIBRARY_PATH='c:\geodjango\gdal\bin\geos_c_fw.dll'
你似乎已经回答了你自己的问题。谢谢你的建议。我也有类似的问题。我也有这样一行:
GEOS_LIBRARY_PATH = r'C:\OSGeo4W\bin\geos_c.dll'
(劫持主题一段时间。我知道人们在 Windows 上找到工作的 geos 二进制发行版时遇到问题。经过几次尝试,似乎OSGeo4W 的发行版适用于我。但我在其他人的博客上读到,其他发行版而不是 OSGeo4W 在他们的计算机上运行。)
因此我删除了这一行并将 C:\OSGeo4W\bin\geos_c.dll 添加到系统的 PATH 环境变量中。之后,它工作正常。所以这证实了托斯卡纳的解决方案。希望它可以帮助遇到同样问题的人们。
You seems to have answered your own question. Thanks for the suggestion. I had a similar issue as well. I also had a line like:
GEOS_LIBRARY_PATH = r'C:\OSGeo4W\bin\geos_c.dll'
(Hijack the topic for a while. I know people have problems with finding a working geos binary distribution on windows. After several tries, seems OSGeo4W's distribution works for me. But I read on other people's blogs that some other distribution instead of OSGeo4W's works on their machines.)
So I remove this line and add C:\OSGeo4W\bin\geos_c.dll to system's PATH environment variable. After that, it works fine. So this confirms Tuscan's solution. Hopes it can help people running into the same issue.