Extension hacking

Anthony Lenton antoniolenton at gmail.com
Sun Jun 8 05:48:37 CEST 2008


Hello,
I'm starting to put together an extension to play around a bit, and I
tried to play around a bit with the gns2shp extension.
It seems to be a bit out of date as it doesn't run properly with the
files you download from
http://earth-info.nga.mil/gns/html/cntry_files.html
The headers seem to be different to the ones it supposes it will
receive, so if you try with a file recently downloaded you now get a

Traceback (most recent call last):
  File "/home/anthony/svn/thuban/trunk/thuban/Thuban/UI/mainwindow.py",
line 300, in invoke_command
    command.Execute(self.Context())
  File "/home/anthony/svn/thuban/trunk/thuban/Thuban/UI/command.py",
line 121, in Execute
    apply(self.function, (context,) + self.args + args, kw)
  File "/home/anthony/svn/thuban/trunk/thuban/Extensions/gns2shp/gns2shp.py",
line 138, in gns2shp_dialog
    no = gns2shp(gns_filename, gns_filename[:-4])
  File "/home/anthony/svn/thuban/trunk/thuban/Extensions/gns2shp/gns2shp.py",
line 93, in gns2shp
    MODIFY_DATE  = line.split('\t')
ValueError: too many values to unpack

I was wondering if this is a bug, or if I'm trying with the wrong files.
Also, I don't know if it would be better to update to the new file
format, or to make it flexible so that the user can select the lat/lon
columns, and the other columns are taken as data, or something.

Kind regards,

-- 
Anthony Lenton
Except - The good guys in software development
http://except.com.ar




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)