problem with the shapelib module.. help
I want to do some mapping application with zope.. but I have run into this problem over and over.. in "Run Zope in Console" Exception exceptions.AttributeError:"ShapeFile instance has no attribute 'thisown'" in ignored in web browser Site Error An error was encountered while publishing this resource. Error Type: IOError Error Value: new_ShapeFile failed I change some setting to my runzope.bat because I want zope to use python2.4.4 instead of the build 2.3.5 because I have install shapelib module(pyshapelib-0.3.win32-py2.4) which is the module I want to use for the import of my external methods. The runzope.bat looks like this: @set PYTHON=C:\Python24\python.exe @set ZOPE_HOME=C:\web\Zope\Zope @set INSTANCE_HOME=C:\web\ZopeInstance @set SOFTWARE_HOME=C:\web\Zope\Zope\lib\python @set CONFIG_FILE=C:\web\ZopeInstance\etc\zope.conf @set PYTHONPATH=C:\Python24\Lib;%INSTANCE_HOME%\lib\python;%SOFTWARE_HOME%;%PYTHONPATH% @set ZOPE_RUN=%SOFTWARE_HOME%\Zope2\Startup\run.py "%PYTHON%" "%ZOPE_RUN%" -C "%CONFIG_FILE%" %1 %2 %3 %4 %5 %6 %7 I made a very short python external method to test the shapelib module import shapelib, dbflib def testShapeLib(self): f1 = shapelib.ShapeFile('C:\\web\\ZopeInstance\\taipei.shp') but all I get out of it is the above two errors anyone have any idea what i'm do wrong with my settings or my code? any thought? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
I change some setting to my runzope.bat because I want zope to use python2.4.4 instead of the build 2.3.5 Don't do that. If you need python2.4 then use newer Zope version that uses 2.4 eg. Zope2.9, Zope2.10.
import shapelib, dbflib def testShapeLib(self): f1 = shapelib.ShapeFile('C:\\web\\ZopeInstance\\taipei.shp') Is this working without Zope?
-- Maciej Wisniowski
Allen Huang wrote at 2006-12-21 23:23 -0800:
I want to do some mapping application with zope.. but I have run into this problem over and over..
in "Run Zope in Console" Exception exceptions.AttributeError:"ShapeFile instance has no attribute 'thisown'" in ignored
Hmm. I doubt that you have really seen this text. There should be something in between the "in" and the "ignored". It is *vital* that you are as precise as possible in your problem reports... Python emits messages of the kind above in some (rare) situations, e.g. when exceptions occur in destructors. The exception above seems to have been raised in such a situation. The missing thing betwenn "in" and "ignored" should tell us which situation this was. It tells you that something tries to access the attribute "thisown" on a "ShapeFile" instance but this does not have the attribute.
in web browser Site Error An error was encountered while publishing this resource. Error Type: IOError Error Value: new_ShapeFile failed
Another tip for the future. When you report problems, you need to include full error information. Beside the "Error Type" and "Error Value" above, this also includes the traceback. You find all this information in the "error_log" object in Zope's "Root Folder" (Management Interface). -- Dieter
participants (3)
-
Allen Huang -
Dieter Maurer -
Maciej Wisniowski