[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-bug: problem with tragesym



Hi Perry,

On Freitag, 10. April 2009, Perry Hargrave wrote:
> I am really a n00b at geda in general, but I recently tried to follow
> this guide: http://geda.seul.org/wiki/geda:tragesym_tutorial
>
> I (think) the steps were clear and simple enough to follow, I used a
> combination of OOo and vim to setup a tab separated file and it
> looked OK to me, but when I tried:
>
> $ /usr/bin/tragesym mega164p.csv mega164p2.sch
> Traceback (most recent call last):
>    File "/usr/bin/tragesym", line 599, in <module>
>      opts,attr,pins=readsrc(file_in)
>    File "/usr/bin/tragesym", line 209, in readsrc
>     
> geda_attr[(string.strip(element[0]),nr)]=string.strip(element[1])
> IndexError: list index out of range

tragesym doesn't accept empty attributes. You can remove the lines
from the source file or add a comment mark '#' in front of the 
attribute.

In your csv file the attributes documentation, dist-licence and 
use-licence are empty.
------
description	Atmel 8-bit microprocessor					
documentation						
author	Perry Hargrave					
numslots	0					
dist-license						
use-license						
-------

> not so good, so I tweaked tragesym a bit and it seems to have worked.
> I claim no expertise with python or geda so attached is a patch and
> the relevant files.
>
> mega164p.csv (tab separated file for tragesym)
> mega164p.sch (symbol output after my hacking)
> tragesym.diff

Thanks for the patch, I've changed tragesym. The empty attributes will 
be dropped now:

git commit:
------
commit 8bec9babf2fbb3dfb03eebce7169bf39d8796a6e
Author: Werner Hoch <werner.ho@xxxxxx>
Date:   Sun Apr 12 12:07:22 2009 +0200

    tragesym: accept empty attributes in the src file

    tragesym crashed if a src file had an empty attribute "key=".
    Just ignore empty attributes and print a warning.

    Bug reported by Perry Hargrave <perry.hargrave@xxxxxxxxx> on the
    geda-bug mailing list.
-----------

Regards
Werner


_______________________________________________
geda-bug mailing list
geda-bug@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-bug