Error with converted eagle symbol library


#1

I’ve converted an eagle library to use it in Kicad. Everything was ok until I’ve installed the nightly version.
Since then I try to use the library but every time I want to add a component in schematic, I get the error:

Part library ‘path/blabla.lib’ failed to load. Error: invalid text stype, expected ‘Normal’ or ‘Italic’ in input/source ‘path/blabla.lib’

What is that supposed to be ?


#2

It seems your footprints use an unsupported font type.

Without the library we can not really help you further.
(Yes i know sometimes you just need to vent your frustration but if you want real help we need more information.)


#3

It night be the new schematic IO legacy parser plugin. It might be a bug, or might be more strict parsing. Either way, you need to post the lib or component that is giving the problem, for deeper analysis.


#4

It is only a custom library done when I’ve worked with eagle.
What was done exactly is: I’ve converted this library to use it with kicad version 4.
I’ve created my schematic and also my layout.
I’ve installed the version nightly of Kicad, then I’ve copied the .pro, .sch and .pcb files to a new folder.
I tried to open the project with the new version of Kicad, add the library.
But all the components of this libraries were presented in the schematic as a box with interrogation point.
and when I try to add a component, this error is poed up and the library doesn’t show in the list.
On the other side, a library was created in the old folder with the devices used in the project.


#5

We need to see the library to help you.


#6

I can’ attach the library (new users could not do that)


#7

That’s a pity. github is an easy to use and free file sharing site, there are others.

@Joan_Sparky is there anything we can do about that? I appreciate there are anti-spam measures, but we are throwing out the baby with the bath water.


#8

You can put the library somewhere else on the net. (dropbox, google drive, …)
Then give us a link here.
Alternatively: read a few posts. And you should get basic rank
From: https://meta.discourse.org/t/what-do-user-trust-levels-do/4924/4
If a user sticks around long enough to read a bit, Discourse now trusts them as a basic user.
They can get to trust level 1 by…

entering at least 5 topics
reading at least 30 posts
spend a total of 10 minutes reading posts

#9

Thx for helping, I’ve totally forget such solutions
here is the library


#10

We need to see the KiCad library…

I can confirm the error comes from the legacy plugin :

// Here things are murky and not well defined.  At some point it appears the format
// was changed to add text properties.  However rather than add the token to the end of
// the text definition, it was added after the string and no mention if the file
// verion was bumped or not so this code make break on very old component libraries.
//
// Update: apparently even in the latest version this can be different so added a test
//         for end of line before checking for the text properties.
if( LIB_VERSION( m_versionMajor, m_versionMinor ) > LIB_VERSION( 2, 0 ) && !is_eol( *line ) )
{
    if( strCompare( "Italic", line, &line ) )
        text->SetItalic( true );
    else if( !strCompare( "Normal", line, &line ) )
        SCH_PARSE_ERROR( _( "invalid text stype, expected 'Normal' or 'Italic'" ),
                         aReader, line );
    if( parseInt( aReader, line, &line ) > 0 )
        text->SetBold( true );

#11

#12

sorry, scratch this, complete red herring

Whitespace is ignored, not a problem.


#13

Ok, new theory :slight_smile:

the error occurs at the following line :

T 0 2600 -2472 56 0 1 0 “The four “TOP” pads have to be connected to the top layer with thermals.\nThe top layer under the device has to be connected to gnd with several vias for low impedance.” Normal 0 C C

The string contains embedded quote marks, which is not allowed. I would say that is a bug in the conversion script “eagle-lbr2kicad-1.0.ulp Version:2.70”. Quote marks must be escaped with back-slash “”.

After applying that fix to the lib file via a text editor, the library loads better (still has warnings, but can be ignored) in the latest nightly build (2017-02-12).


#14

I thought kicad can import eagle lips natively. (At least the footprints of this lib)
No need for an explicit conversion via an ulp.

If you want to test that: open the library wizard in either the footprint editor or pcb new and add a local library.
Browse to your folder containing the library and select the library that should be added. The next window should tell you that the library type is eagle and that it is ok.
Add it either to the project or global fp-lib-table.

If you want the footprints converted you can simply store them via the footprint editor in a kicad library. (This part might be a bit of work if you have many footprints.)


#15

No, it’s a schematic library. Your advice is not helpful.


#16

I added this information to the title. (So that others don’t assume the same stuff as i did.)


#17

So the quote mark is used to contain the text and the text {string four"TOP" pads} needs escaping.
As the text can contain just about anything, how many other illegal characters need to be escaped or dropped with a warning?


#18

I’ve tried this but it doesn’t work.

should I also change the quote marks in such lines
T 0 -20 -122 56 0 1 0 “GND” Normal 0 C C ?
or it must be so ?


#19

Thank you for your help!
I only had to remove the quote marks of the word TOP and keep the other ones.


#20

I think Chris could lower the standard, but look at what the hurdles are… they’re not that high to begin with.

Being able to attach a file/image per post every 4 hours is done within 10 minutes.
Being able to do more takes longer… 1 day I think or 2 max… really no big deal.