No footprints - unable to parse

Bug #1310860 reported by John Wilson
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

I've just downloaded kicad for a windows computer and ubuntu 14.04. The windows computer installed the software and it works fine. On the ubuntu computer it took 3 hours to run the script and compile everything.

Trying to run CVPCB causes a long list of errors:

Errors were encountered loading footprints
IO_ERROR: Unable to parse URL:
'${KIGITHUB}/Connect.pretty'
from /home/sparky/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507
IO_ERROR: Unable to parse URL:
'${KIGITHUB}/Connectors_Serial_MOLEX.pretty'
from /home/sparky/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507
IO_ERROR: Unable to parse URL:
'${KIGITHUB}/Converters_DCDC_ACDC.pretty'
from /home/sparky/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507
IO_ERROR: Unable to parse URL:
'${KIGITHUB}/Crystals.pretty'
from /home/sparky/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507
IO_ERROR: Unable to parse URL:
'${KIGITHUB}/Capacitors_ThroughHole.pretty'
from /home/sparky/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507
IO_ERROR: Unable to parse URL:
'${KIGITHUB}/Diodes_ThroughHole.pretty'
from /home/sparky/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507
IO_ERROR: Unable to parse URL:
'${KIGITHUB}/Air_Coils_SML_NEOSID.pretty'
from /home/sparky/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507
IO_ERROR: Unable to parse URL:
'${KIGITHUB}/Fiducials.pretty'
from /home/sparky/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507

After this it comes up with a confirmation window:

Some of the assigned footprints are legacy entries (are missing lib nicknames). Would you like CvPcb to attempt to convert them to the new required FPID format? (If you answer no, then these assignments will be cleared out and you will have to re-assign these footprints yourself.)

If I click on YES I get: IO_ERROR: Unable to parse URL:
'${KIGITHUB}/Air_Coils_SML_NEOSID.pretty'
from /home/sparky/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507

First check your fp-lib-table entries.

Trying to read the netlist from the pcb program gives:

Error loading netlist.
IO_ERROR: Unable to parse URL:
'${KIGITHUB}/Air_Coils_SML_NEOSID.pretty'
from /home/sparky/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507

I haven't used Unix since the early 80s and just got ubuntu up and running yesterday. There must be an easier way to install KiCad.

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

Verify that your KIGITHUB environment variable is set:
console:

$ cat /etc/profile.d/kicad.sh
export KIGITHUB=https://github.com/KiCad
export MY_LIBS=/i/pcbs/pretty_footprints
export EGMOD=/opt/eagle-6.4.0/lbr
export KISYSMOD=~/kicad_sources/library-repos

You should have at least the line:

export KIGITHUB=https://github.com/KiCad

in there. If so, then reboot. After rebooting, verify it is getting into the environment.

console:

$ echo $KIGITHUB
https://github.com/KiCad

If not, find another way to set it. There is an alternative offered in the kicad_install.sh script. Grep it for KIGITHUB.

Revision history for this message
John Wilson (jwilson-2) wrote :

Thank you! I will try these out and see if it fixes it. Your help is very much appreciated.

Revision history for this message
Ansible (bburdette) wrote :

I installed kicad with apt-get on ubuntu 13.10. It has this same problem; there isn't a file installed at /etc/profile.d/kicad.sh, nor is there a kicad_install.sh script included with the package.

I added "export KIGITHUB=https://github.com/KiCad" to my .profile, logged out and back in, and now that error is gone.

Revision history for this message
Olivier (oc-spam66) wrote :

Hello,

I installed KiCad 2014-04-23 BZR 4819 with the (great) script "kicad-install.sh" and I also ran into the same problem:
"""
Erreurs trouvées en chargement des empreintes
IO_ERROR: Impossible d'analyser l'URL:
<${KIGITHUB}/Air_Coils_SML_NEOSID.pretty>
from /root/kicad_sources/kicad.bzr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 507
"""

Following your advice, I defined the variable KIGITHUB as you said:
$ export KIGITHUB=https://github.com/KiCad
$ cvpcb essai.net

It solved the problem and it worked fine. Thank you very much!

---
However, I want to work offline!!!

So I downloaded the libraries with the script "library-repos-install.sh". They are now all in ~/kicad_sources/library-repos, but "cvpcb" does not see them. It keeps on trying to connect to GitHub, which fails, of course, when the computer is away from network. What a disappointment. Do you have a solution?

Revision history for this message
Olivier (oc-spam66) wrote :

In my previous description, I forgot to say that I had the variable KISYSMOD set like this:
$ export KISYSMOD=~/kicad_sources/library-repos
I think this should do the job, but it doesn't.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

Please, read the CvPcb doc, especially chapter 5.2, and modify your library table.

Revision history for this message
Olivier (oc-spam66) wrote :

I had this chapter in front of my eyes and went through it before asking the question (I'm not completely lazy).
I don't get what you mean by "modify your library table"... do you mean I should manually edit the 85 entries of the table?

I did some guess work and finally issued this command:
$ cp /usr/local/share/kicad/template/fp-lib-table.for-pretty ~/fp-lib-table

This worked, but I think I just happened to be lucky. I don't understand if it was the right way to go. Indeed, the file "fp-lib-table.for-pretty" comes from the KiCAD installation a few days ago, while the libraries where downloaded just today. Is there a guarantee that the file "fp-lib-table.for-pretty" will always describe the downloaded libraries consistently?

What I expected was be a button like "Populated library table from directory", and I would simply have indicated the "~/kicad_sources/library-repos" directory (where all the "*.pretty" libraries are)

Revision history for this message
jean-pierre charras (jp-charras) wrote :

The first time you are using a Tool like Kicad you have to configure it to your work.

What I mean by "modify your library table" is to remove what you do not need.
"do you mean I should manually edit the 85 entries of the table?":
I mean you certainly do need need 85 entries.
Only 5 to 10.
Depending on you need (For instance, if you do not use valves or relays, why keep the corresponding libs in list)

This is a basic work needed *by all existing EDA tools*, not especially Kicad.

"What I expected was be a button like "Populated library table from directory"": This feature has no sense.

Revision history for this message
Olivier (oc-spam66) wrote :

Thank you for your sensible explanations.

Revision history for this message
Jaime Andrés Quiroga Perdomo (gtronick) wrote :

Hello!, i have solved this by using a local folder, containing all the .mod files. To do this do the following:

1. Run KiCAD
2. Launch CvPCB
3. Close the error window
4. Go to preferences -- Edit Library Table
5. Delete all the rows
6. Download the needed footprints libraries to a local folder from: https://github.com/KiCad?page=1
7. Navigate through the pages to find additional library files, note that all of those ends with ".pretty" (without the quotes)
8. Enter each link and goto the right side of the screen and Click on "Download ZIP"
9. Extract the downloaded package into the desired folder
10. Goto the Edit Library Table window on CvPCB, and Append Row
11. Now, enter a name and the path to the library.
12. Finally click OK

Repeat this process to all the desired libraries.

Have fun!

Revision history for this message
Nick Østergaard (nickoe) wrote :

Does this mean that this is a user (mis)configuration issue? If yes, then I think this should be marked as invalid.

Revision history for this message
wonko (crangos) wrote :

Running Ubuntu 14.04 I ran into the same issue, the KIGITHUB variable was not set after installing via apt-get. While fixing that is not an issue, I don't feel this is a user misconfiguration, especially for beginners.

Revision history for this message
Louis Simons (lousimons) wrote :

I agree with wonko. I followed the advice in #3, but I had to coach a friend through it, and it seems like a fix could reduce some grief.

tags: added: github-plugin
Revision history for this message
Melroy van den Berg (melroyvandenberg) wrote :

Why not use a local config file for this information? Or some small local database file, which stores all the KiCad configs?

Revision history for this message
Nick Østergaard (nickoe) wrote :
Revision history for this message
Matthijs Kooijman (matthijskooijman) wrote :

I just installed the latest kicad package from this ppa: https://code.launchpad.net/~js-reynaud/+archive/ubuntu/ppa-kica
That version has a /etc/profile.d/kicad-env.sh which fixes this by defining KIGITHUB, but it does require logging out and in again after installation (or manually sourcing that file). Just FYI.

Revision history for this message
Matthijs Kooijman (matthijskooijman) wrote :

Oh, actually trying it shows that it does _not_ fix it, the file is missing "export"

Revision history for this message
Nick Østergaard (nickoe) wrote :

I will mark this as fix comitted because a change to define defaults for the environment variables including the KIGITHUB, hence this exact bug should not appear again.

https://lists.launchpad.net/kicad-developers/msg16659.html
http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/revision/5404

Changed in kicad:
status: New → Fix Committed
Revision history for this message
Karl Zeilhofer (zeilhofer) wrote :

just my two words on this:
I run Kubuntu 14.10

It worked, when I edited the file with kate
sudo kate /etc/profile.d/kicad-env.sh

I had to enter "export"

file content now:
# Env var for kicad github plugin
export KIGITHUB="https://github.com/KiCad"

log out and back in again, now it works.

What is very weired for me, is that a local eagle-library couldn't be parsed due to this bug.
I'm wondering, what has the KIGITHUB variable to do with a local eagle-lib?

greets, Karl

Jon Neal (reportingsjr)
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.