[Gvsig_english] Error when I open a DBF file

Antonio Falciano afalciano at yahoo.it
Tue Apr 3 16:47:30 CEST 2007


Hi list!
I'm trying to read a DBF file without success...
In Jython shell I have the following type of error:

 >>> from java.io import File
 >>> pathToDbf="D:\workspace\myDBF.dbf"
 >>> 
dbaseFile=gvSIG.classForName("com.iver.cit.gvsig.fmap.drivers.dbf.DbaseFile")
 >>> myDBFFile=File(pathToDbf)
 >>> dbaseFile.open(myDBFFile)
TypeError: open(): expected 2 args; got 1

 From javadocs, the method "open" of "DbaseFile" accepts only one argument.
Why am I obtaining this error?
The same happens with the class DbaseFileNIO:

 >>> 
dbaseFileNIO=gvSIG.classForName("com.iver.cit.gvsig.fmap.drivers.shp.DbaseFileNIO")
 >>> dbaseFile=dbaseFileNIO.open(myDBFFile)
TypeError: open(): expected 2 args; got 1

Do I perhaps forget something?

Regards,
Antonio


More information about the Gvsig_internacional mailing list