Footprint editor keeps giving error (invalid character)


#1

Keep getting an "invalid character’ error from the footprint editor in pcbnew.

I have no idea what this means, I’ve doubled checked the file name, *REF and value and cant find anything wrong.
I cant save my footprint because of this error, I need to make this go away.


#2

Please give us more details. We can not look at your pc.

What exactly did you call your footprint.
Can you make a screenshot of the dialog that pops for choosing the name.
Can you make a screenshot of the footprint settings. (make sure that we can read what the field footprint name in library contains.)


#3

Well, if you don’t tell us the file name, the reference and the value, we can’t guess what problem you have.


#4

Sorry was trying to figure out how to post pics or links when I posted this

How do I add pics or links to a post??


#5

Drag and drop should work. Open the file browser and simply drag it into the edit field.
Or use the upload button.
(New users can only post one picture per post.)


#6

Thanks


#7

The error warning is above the field that would be interesting.
Can you copy the content of the “Footprint name in library” field?


#8

Clearly “My Connectors” has a space in it.


#9

I’ve used "My Connectors " before without any problems.


#10

Anything in 3D settings?


#11

No, I’m trying to add a 3d footprint.


#12

I had a similar problem adding 3d models, even after deleting the 3d path, it seems to get stuck with an invalid path somewhere. I can’t remember how I got round it, I suspect it’s a bug. What version are you running?


#13

Can you try it without the space to rule it out definitely?
This should not take long, but if it is the problem it will be faster than searching for another non existing problem.
By the way it might work under your operating system. This restrictions are there such that your design is portable to other operating systems. So i would remove the space anyways just to be sure.


#14

I also think the space in the library name is the problem.

Could you check if the library My Connectors is loaded into the project?, i.e. it is listed in the fp-lib-table?


#15

Strange enough removing the space in “My Connectors” seems to work.
But I’m afraid it might screw things up in the future since the file name has changed.


#16

Looking at the source code, the only place that error is generated is on the module name. If it worked before, maybe it was a different version. I think that error is checked for only when you try to save a module, but ‘space’ might work ok when loading the modules.

But as of now, the characters in that error message are not allowed in module name. It’s a pain, but you will need to rename all references to that library :frowning2:


#17

Definitely, spaces ARE allowed in library names.

So now I think the error relies in the library name itself, no matter the name.

Please, select My Connectors as the working library
Try Footprint Name in Library : Molex_17310_Vert_3Pin without the library name!!

If the library name is appended by default, delete it.

Please, give us feedback. If what I say is correct, you have found a bug.


#18

Computer says no? https://github.com/KiCad/kicad-source-mirror/blob/8e7fe9dab202426740003710cf703f8456691e29/pcbnew/class_module.cpp#L883

ETA: a bug was raised https://bugs.launchpad.net/kicad/+bug/809626 and a fix was committed, which I think was this one
https://git.launchpad.net/kicad/commit/?h=4.0&id=4a26d543d5d022990a85dc71ea5dfe65c8fe968b

It appears a conscious decision was made to exclude space in names, I don’t know if that was documented anywhere else.


#19

Well, there is somewhere a function that allows spaces and a function that doesn’t: this is the reason there is a bug.

I created a library with a whitespace, loaded to the fp-lib-table and everything went OK.

Then I edited a footprint and save it to that library. OK.

The only place I had a problem, solved deleting the library name under “Footprint Name in Library” was in the properties menu.
Furthermore, the problem persisted with a library name with no whitespaces at all!!


#20

Yes, I think the rules are not applied consistently, pretty confusing!

I’m not sure why “space” was excluded, it can cause applications problems particularly on the command line, but is not actually an illegal character for a filename (allowed in Windows, Linux), unlike say ‘’ or ‘/’.

I wouldn’t mind either way, I usually avoid “space” (old habits). I guess we kick the problem over to the Committee on User Interface Standards (meets once yearly at the Dog and Onion).