PCBNew Library Browser: file-not-found error on loading module libraries

Asked by Chris Wilkinson

When I try to open a module library in PCBNew's Library Browser (or if I search for a module name, or if I click "List All"), it displays this error message:
<i>Errors were encountered loading footprints
IO_ERROR: footprint library path '~/kicad_sources/library-repos/Sockets_DIP.pretty' does not exist
from /home/chris/kicad_sources/kicad.bzr/pcbnew/kicad_plugin.cpp : FootprintEnumerate() : line 1793</i>
If I copy and paste the file path into a terminal with "cd", I can see the contents, so the folder is definitely there, and it's definitely spelled, capitalized and punctuated correctly. I don't understand why KiCad can't see the folder.

This is a new install of KiCAD, BZR 5034. I ran ./kicad-install.sh --uninstall-kicad and ./kicad-install --uninstall-libraries, then renamed ~/kicad_sources to ~/kicad_sources_old. I ran install-kicad.sh and library-repos-install.sh, set {KISYSMOD} in /etc/profile.d/kicad.sh, rebooted and ran "cp ....." (copied and pasted from line 18 of library-repos-install.sh). I reinstalled because, upon replacing Linux Mint 16 64-bit with Ubuntu Trusty 64-bit, KiCad crashed when PCBNew opened. (The OS change left a bit of a mess. I didn't format the partition because I wanted to keep my home folder.)

Thanks.
- Chris

Question information

Language:
English Edit question
Status:
Answered
For:
KiCad Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dick Hollenbeck (dickelbeck) said :
#1

> IO_ERROR: footprint library path '~/kicad_sources/library-repos/Sockets_DIP.pretty' does not exist

This text appears to be from line 269 of pcbnew/kicad_plugin.cpp:

    wxDir dir( m_lib_path.GetPath() );

    if( !dir.IsOpened() )
    {
        wxString msg = wxString::Format(
                _( "Footprint library path '%s' does not exist" ),
                GetChars( m_lib_path.GetPath() )
                );

        THROW_IO_ERROR( msg );
    }

Are you running KiCad as the same user who did the directory listing?

$ ll -d ~/kicad_sources/library-repos/Sockets_DIP.pretty/
drwxr-xr-x 3 dick develop 4096 Apr 9 08:39
/home/dick/kicad_sources/library-repos/Sockets_DIP.pretty/

The drwxr-xr-x shows that user dick has 'x' = search rights in the Sockets_DIP.pretty
directory. Some other user may not have such search(/execute) rights.

I think wxDir() would need search rights.

Revision history for this message
Chris Wilkinson (863-wilkinson) said :
#2

$ ls -ld ~/kicad_sources/library-repos/Sockets_DIP.pretty/
drwxrwxr-x 3 chris chris 4096 Jul 28 19:09 /home/chris/kicad_sources/library-repos/Sockets_DIP.pretty/

I did ls and kicad both as user chris. (I tried $ sudo kicad, but the error still occurred.)

Revision history for this message
Dick Hollenbeck (dickelbeck) said :
#3

On 07/30/2014 08:37 AM, Chris Wilkinson wrote:
> Question #252378 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/252378
>
> Status: Answered => Open
>
> Chris Wilkinson is still having a problem:
> $ ls -ld ~/kicad_sources/library-repos/Sockets_DIP.pretty/
> drwxrwxr-x 3 chris chris 4096 Jul 28 19:09 /home/chris/kicad_sources/library-repos/Sockets_DIP.pretty/
>
> I did ls and kicad both as user chris. (I tried $ sudo kicad, but the
> error still occurred.)
>

Sorry, I can't help you further without you sending me your computer and about $1,000. for
my time.

In your shoes I would link against a Debug build of wxWidgets, and single step down into
the wxWidgets library to find out why it's whining.

I don't know if you have skills to do that. But the problem is not duplicate-able here.

Revision history for this message
Reimar (g-mabl-u) said :
#4

But the problem is duplicate at me ...
I've got exactly the same issue. On my Ubuntu system (Linux 3.13.0-32-generic, 32bit), there's KiCad Build 2014-jul-16, installed from ppt. When I try to import my footprint libraries (older versions) in the library browser, I get exactly the same error:

"IO_ERROR: Der Footprintbibliothekspfad '/media/Projekte/PCBs_N/LibE/Eigene.mod' existiert nicht.
from /build/buildd/kicad-0.201407300931+5035~15~ubuntu14.04.1/kicad/pcbnew/kicad_plugin.cpp : FootprintEnumerate() : line 1793

So this seems to be no "singelton" problem.

Revision history for this message
Dick Hollenbeck (dickelbeck) said :
#5

Read the section of the pcbnew  manual about the footprint library table.

Don't come back until you know what the plugin type column is for.

Sent from my Galaxy S®III

<div>-------- Original message --------</div><div>From: Reimar <email address hidden> </div><div>Date:08/01/2014 4:16 AM (GMT-06:00) </div><div>To: <email address hidden> </div><div>Subject: Re: [Question #252378]: PCBNew Library Browser: file-not-found error
  on loading module libraries </div><div>
</div>Question #252378 on KiCad changed:
https://answers.launchpad.net/kicad/+question/252378

Reimar proposed the following answer:
But the problem is duplicate at me ...
I've got exactly the same issue. On my Ubuntu system (Linux 3.13.0-32-generic, 32bit), there's KiCad Build 2014-jul-16, installed from ppt. When I try to import my footprint libraries (older versions) in the library browser, I get exactly the same error:

"IO_ERROR: Der Footprintbibliothekspfad '/media/Projekte/PCBs_N/LibE/Eigene.mod' existiert nicht.
from /build/buildd/kicad-0.201407300931+5035~15~ubuntu14.04.1/kicad/pcbnew/kicad_plugin.cpp : FootprintEnumerate() : line 1793

So this seems to be no "singelton" problem.

--
You received this question notification because you are an answer
contact for KiCad.

Revision history for this message
Richard Walker (walkerr1) said :
#6

I've spent three days on this same problem trying to libs loaded locally on my machine
to be able to make local mods.

The error message points to a path that exists and has 777 world
readable/writable attributes.

Here's the rub. In the error message:

   IO_ERROR: footprint library path '~/kicad_sources/library-repos/Sockets_DIP.pretty' does not exist

The issue is that the wxDir dir( m_lib_path.GetPath() ); routine does not parse "~" notation.

If I change "~" to "/home/walker/" it works great and the error message goes away.

You would have thought that a "power user" like Dick should have seen this immediately. His
complete disdain for real-users finding real bugs (that he wrote) shows that his mother
named him appropriately.

Revision history for this message
Wayne Stambaugh (stambaughw) said :
#7

On 3/12/2015 6:41 PM, Richard Walker wrote:
> Question #252378 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/252378
>
> Richard Walker proposed the following answer:
> I've spent three days on this same problem trying to libs loaded locally on my machine
> to be able to make local mods.
>
> The error message points to a path that exists and has 777 world
> readable/writable attributes.
>
> Here's the rub. In the error message:
>
> IO_ERROR: footprint library path '~/kicad_sources/library-
> repos/Sockets_DIP.pretty' does not exist
>
> The issue is that the wxDir dir( m_lib_path.GetPath() ); routine does
> not parse "~" notation.
>
> If I change "~" to "/home/walker/" it works great and the error message
> goes away.

I'm not sure exactly what your question is. This seems like it should
be a bug report. Please keep in mind that wxWidgets (KiCad's primary UI
library) is a cross platform library. I'm guessing the wxWidgets
developers decided that ~ has no meaning on Windows and chose not to
support expanding it for portability purposes. Generally speaking,
using ~ has no meaning on windows unless you are using some bash shell
such as cygwin or msys. The cygwin and msys bash shell's concept of ~
may not be where the windows user's home folder is actually located.
Using ${HOME} in your footprint library table (which judging by the code
you posted is what you are trying to do) would work in this case.

>
> You would have thought that a "power user" like Dick should have seen this immediately. His
> complete disdain for real-users finding real bugs (that he wrote) shows that his mother
> named him appropriately.
>

Since I cannot tell whether you are trying to be ironic given the fact
that your mother gave you the same first name as Dick (Yes his first
name is Richard) or this is just a personal attack, I'm going to give
you the benefit of the doubt (although I'm betting that this is a
personal attack). This is both your first and last warning. As I am
now the project leader of KiCad, I will defend my development team
(including Dick even though he is no longer with the project) as best I
can from any forms of abuse. Since my options are limited in the
regard, it means the next time you engage in this type of behavior, I
will have no choice but to remove you from the developers list. In the
future, please keep the discussion on a technical level.

Revision history for this message
Richard Walker (walkerr1) said :
#8

Hello Wayne,

> I'm not sure exactly what your question is. This seems like it should
> be a bug report.

I was responding with an answer to a question posted by Chris Wilkinson on
2014-07-30. I searched the forum because I had the same problem as Chris.

Kicad was giving an error:
IO_ERROR: footprint library path '~/kicad_sources/library-repos/Sockets_DIP.pre
tty' does not exist

I came to the forum for one purpose. To find out why this error occurs and
how to fix it. I had wasted three days playing with various configs and
couldn't get my local libraries working for the same reason as Chris and
Reimar.

Here's what I found: Dick responded and did one useful thing. He quoted the
source code from where the error message arose. Then he did a few other
things:
1) Said he couldn't help unless the OP sent him his computer and $1000, 2)
said the problem could only be approached by doing a debug build of wxWidgets,
3) said the problem was not duplicatable.

Knowing the nature of the problem, I can say it was entirely duplicatable and
in fact trivial. Dick just didn't care enough to try to duplicate it. His
behavior implies that the OP's problem simply isn't important enough to be
bothered with.

This kind of dismissive attitude looked so bad that Reimar jumped in and said
that it wasn't an idiosyncratic problem, because Reimar had the same behavior
on his system. So now we have two "users" saying that they've worked hard on
this and it appears to be a real bug - please help!

Dick then cuts the whole dialog off by saying "Don't come back until you know
what the plugin type column is for."

What an insulting way to handle an honest bug report - dismiss it as
non-existent - I can't see it in my flow, so it doesn't matter, and then after
it is validated by another user, telling everyone to not to come back until
they've educated themselves to his level or at least built a "debug version of
wxWidgets". It might be acceptable if the "plug-in type column" had any
relevance, but it didn't. It had nothing to do with the bug. Dick just
dismissed the bug report as trivial while insulting the intelligence of the OP.

I had the same problem, and solved it. Dick also could have solved it
trivially, he just didn't care to give the time of day to an ordinary "user".
Actually all the data was there in the post. The OP had a KISYSMOD envar with
a tilde like "~/kicad_source/library...".

When running Kicad, the error message said "~/kicad_source/library... does
not exist". Both Chris and Reimar reported that the library does exist and
the permissions were all correct. I also had run a recursive find and all the
directories and files were chmod 777 all the way down. In UNIX, the error
message should have interpolated the tilde. This is the smoking gun.

I was providing the answer. Don't use "~" in KISYSMOD. It is not
properly interpolated by wxWidgets.

The other problem that I point out is that several of the tutorials show
examples with tildes. Maybe it used to work in a previous version? I
don't know. It doesn't work now.

The most egregious place where the tilde is recommended is in
kicad_sources/kicad.bzr/scripts/library-repos-install.sh
where the user is instructed to
"set your environment variable KISYSMOD to "~/kicad_sources/library-repos".

This is wrong. Tilde is not interpolated by wxwidgets. Anyone following the
instructions inside the production library-repos-install script will get
screwed by this. No telling how many of them have googled the error message,
ended here, read Dick's scathing dismissal of "Don't come back" until you've
educated yourself, and simply given up on getting Kicad working.

> Generally speaking, using ~ has no meaning on windows unless you are
> using some bash shell such as cygwin or msys. The cygwin and msys
> bash shell's concept of ~ may not be where the windows user's home
> folder is actually located. Using ${HOME} in your footprint library
> table (which judging by the code you posted is what you are trying to
> do) would work in this case.

I merely point out that the official library-repos-install script
recommends using "~" and the code
doesn't support it. I got in trouble simply following
instructions that were distributed with kicad source.

> Since I cannot tell whether you are trying to be ironic given the fact
> that your mother gave you the same first name as Dick (Yes his first
> name is Richard) or this is just a personal attack, I'm going to give
> you the benefit of the doubt (although I'm betting that this is a
> personal attack).

Yes. We share the same name. I sometimes have to fight being as
obnoxious as Dick given how slow many users are. I at least try to
keep my impatience in check. Dick however apparently has no restraint or
compassion in this regard whatsover. Every time I run
into him, he has been consistently dismissive, and obnoxious. Most
people are too wowed by him to respond in any way and just
take his abuse.

I don't hunt him down to make my comment, I simply came to this page as a
resource for solving a bug that at least three people have run into. Dick's
dismissive comment was aimed at me as well as any and all that had this bug.

> This is both your first and last warning. As I am now the project
> leader of KiCad, I will defend my development team (including Dick
> even though he is no longer with the project) as best I can from any
> forms of abuse.

OK. Dump me off. You may will find (I have run several similar teams)
that a heavy-handed, "we ban you from our group", approach will
eventually leave you without any competent workers.

Out of curiousity, have you ever used your authority to call Dick on his
behavior? Just checking... If you have, then you have my full respect
and I would be happy to work with/for you at any time - and follow your
lead in such matters. From your comments I can only assume that you have not.

> Since my options are limited in the regard, it means the next time you
> engage in this type of behavior, I will have no choice but to remove
> you from the developers list. In the future, please keep the
> discussion on a technical level.

I have proactively left the developer's list. If you feel that Dick's
attitude towards end users is justified because he wrote a lot of code, then I
don't think I can work with you. You have failed the first test of good
leadership: "no favorites".

So this may be my first and last bug/patch report: Please remove the tilde
from the example KISYSMOD line given in line 20 of the
library-repos-install.sh script. Extra credit for tracking down the same
usage in several web tutorials that probably are just quoting this same script
in the source distribution.

Kind regards,
--
Rick Walker

Revision history for this message
Wayne Stambaugh (stambaughw) said :
#9

On 3/14/2015 3:16 AM, Richard Walker wrote:
> Question #252378 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/252378
>
> Richard Walker proposed the following answer:
>
> Hello Wayne,
>
>> I'm not sure exactly what your question is. This seems like it should
>> be a bug report.
>
> I was responding with an answer to a question posted by Chris Wilkinson on
> 2014-07-30. I searched the forum because I had the same problem as Chris.
>
> Kicad was giving an error:
> IO_ERROR: footprint library path '~/kicad_sources/library-repos/Sockets_DIP.pre
> tty' does not exist
>
> I came to the forum for one purpose. To find out why this error occurs and
> how to fix it. I had wasted three days playing with various configs and
> couldn't get my local libraries working for the same reason as Chris and
> Reimar.
>
> Here's what I found: Dick responded and did one useful thing. He quoted the
> source code from where the error message arose. Then he did a few other
> things:
> 1) Said he couldn't help unless the OP sent him his computer and $1000, 2)
> said the problem could only be approached by doing a debug build of wxWidgets,
> 3) said the problem was not duplicatable.
>
> Knowing the nature of the problem, I can say it was entirely duplicatable and
> in fact trivial. Dick just didn't care enough to try to duplicate it. His
> behavior implies that the OP's problem simply isn't important enough to be
> bothered with.
>
> This kind of dismissive attitude looked so bad that Reimar jumped in and said
> that it wasn't an idiosyncratic problem, because Reimar had the same behavior
> on his system. So now we have two "users" saying that they've worked hard on
> this and it appears to be a real bug - please help!
>
> Dick then cuts the whole dialog off by saying "Don't come back until you know
> what the plugin type column is for."
>
> What an insulting way to handle an honest bug report - dismiss it as
> non-existent - I can't see it in my flow, so it doesn't matter, and then after
> it is validated by another user, telling everyone to not to come back until
> they've educated themselves to his level or at least built a "debug version of
> wxWidgets". It might be acceptable if the "plug-in type column" had any
> relevance, but it didn't. It had nothing to do with the bug. Dick just
> dismissed the bug report as trivial while insulting the intelligence of the OP.
>
> I had the same problem, and solved it. Dick also could have solved it
> trivially, he just didn't care to give the time of day to an ordinary "user".
> Actually all the data was there in the post. The OP had a KISYSMOD envar with
> a tilde like "~/kicad_source/library...".
>
> When running Kicad, the error message said "~/kicad_source/library... does
> not exist". Both Chris and Reimar reported that the library does exist and
> the permissions were all correct. I also had run a recursive find and all the
> directories and files were chmod 777 all the way down. In UNIX, the error
> message should have interpolated the tilde. This is the smoking gun.
>
> I was providing the answer. Don't use "~" in KISYSMOD. It is not
> properly interpolated by wxWidgets.
>
> The other problem that I point out is that several of the tutorials show
> examples with tildes. Maybe it used to work in a previous version? I
> don't know. It doesn't work now.
>
> The most egregious place where the tilde is recommended is in
> kicad_sources/kicad.bzr/scripts/library-repos-install.sh
> where the user is instructed to
> "set your environment variable KISYSMOD to "~/kicad_sources/library-repos".
>
> This is wrong. Tilde is not interpolated by wxwidgets. Anyone following the
> instructions inside the production library-repos-install script will get
> screwed by this. No telling how many of them have googled the error message,
> ended here, read Dick's scathing dismissal of "Don't come back" until you've
> educated yourself, and simply given up on getting Kicad working.
>
>> Generally speaking, using ~ has no meaning on windows unless you are
>> using some bash shell such as cygwin or msys. The cygwin and msys
>> bash shell's concept of ~ may not be where the windows user's home
>> folder is actually located. Using ${HOME} in your footprint library
>> table (which judging by the code you posted is what you are trying to
>> do) would work in this case.
>
> I merely point out that the official library-repos-install script
> recommends using "~" and the code
> doesn't support it. I got in trouble simply following
> instructions that were distributed with kicad source.

Thank you for pointing this out. Since I never use this script, I
didn't realize that it contained information that was incorrect. I will
remove the reference to ~/ for Posix systems and replace it with the
full path and the ${HOME} environment variable expansion which will work
correctly.

>
>> Since I cannot tell whether you are trying to be ironic given the fact
>> that your mother gave you the same first name as Dick (Yes his first
>> name is Richard) or this is just a personal attack, I'm going to give
>> you the benefit of the doubt (although I'm betting that this is a
>> personal attack).
>
> Yes. We share the same name. I sometimes have to fight being as
> obnoxious as Dick given how slow many users are. I at least try to
> keep my impatience in check. Dick however apparently has no restraint or
> compassion in this regard whatsover. Every time I run
> into him, he has been consistently dismissive, and obnoxious. Most
> people are too wowed by him to respond in any way and just
> take his abuse.
>
> I don't hunt him down to make my comment, I simply came to this page as a
> resource for solving a bug that at least three people have run into. Dick's
> dismissive comment was aimed at me as well as any and all that had this bug.

Since Dick has not been involved with the project for almost six months,
I'm surprised that you are bringing this up now unless you contacted him
directly. AFAIK, he removed himself from receiving all launchpad emails
so he most likely did not even see your post.

>
>> This is both your first and last warning. As I am now the project
>> leader of KiCad, I will defend my development team (including Dick
>> even though he is no longer with the project) as best I can from any
>> forms of abuse.
>
> OK. Dump me off. You may will find (I have run several similar teams)
> that a heavy-handed, "we ban you from our group", approach will
> eventually leave you without any competent workers.

I'd rather not dump anyone off the list but I am not naive enough to
believe that I will never have to. I gladly will accept any competent
developers that can help move kicad forward. I will not accept public
personal attacks. Please do that directly with the person you have the
issue with. Dragging the entire development team into such discussions
is counter productive. Trust me when I tell you that I would rather be
writing code than responding to this issue. Unfortunately, it comes
with the project leader title.

>
> Out of curiousity, have you ever used your authority to call Dick on his
> behavior? Just checking... If you have, then you have my full respect
> and I would be happy to work with/for you at any time - and follow your
> lead in such matters. From your comments I can only assume that you have not.

Up until Dick left the project, I did not have any authority other than
contributing code. I will say that I understand the way Dick thinks
better than most which is why I didn't have these kinds of issues. Any
private conversations that I had with Dick about these issues will
respectfully remain private. I cannot change what happened in the past.
 I can only respond to things that happen in the present with a hope
that they will work out for the future of the project.

>
>> Since my options are limited in the regard, it means the next time you
>> engage in this type of behavior, I will have no choice but to remove
>> you from the developers list. In the future, please keep the
>> discussion on a technical level.
>
> I have proactively left the developer's list. If you feel that Dick's
> attitude towards end users is justified because he wrote a lot of code, then I
> don't think I can work with you. You have failed the first test of good
> leadership: "no favorites".

Everyone is biased by there experiences in life. There are no
exceptions. There are only people who think they are not biased. I
will always favor developers who get things done to move the project
forward rather than those who complain and attack others. That being
said, I try to give everyone a fair shake. I hope whatever problems you
had with Dick in the past will not prevent you from contributing to
KiCad in the future.

Best Regards,

Wayne

>
> So this may be my first and last bug/patch report: Please remove the tilde
> from the example KISYSMOD line given in line 20 of the
> library-repos-install.sh script. Extra credit for tracking down the same
> usage in several web tutorials that probably are just quoting this same script
> in the source distribution.
>
> Kind regards,
> --
> Rick Walker
>

Can you help with this problem?

Provide an answer of your own, or ask Chris Wilkinson for more information if necessary.

To post a message you must log in.