footprint libraries wizard fails with personal GitHub accounts

Bug #1597114 reported by Johannes Larsen on 2016-06-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Low
Unassigned

Bug Description

=== Reproduce ===
1. open pcbnew
2. open Preferences -> Footprint Libraries Wizard
3. select Github repository
4. replace URL with one to a personal GitHub user (e.g. https://github.com/johslarsen)
5. click Next

=== Error Message ===
    https GET command failed
    Cannot get/download data from: 'https://api.github.com/orgs/johslarsen/repos?per_page=99&page=1'
    Reason: 'Not found'

=== Version Information ===
    Application: kicad
    Version: 4.0.2-stable release build
    wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1010,GCC 6.1.1,wx containers,compatible with 2.8)
    Platform: Linux 4.6.3-1-ARCH x86_64, 64 bit, Little endian, wxGTK
    Boost version: 1.60.0
             USE_WX_GRAPHICS_CONTEXT=OFF
             USE_WX_OVERLAY=OFF
             KICAD_SCRIPTING=ON
             KICAD_SCRIPTING_MODULES=ON
             KICAD_SCRIPTING_WXPYTHON=ON
             USE_FP_LIB_TABLE=HARD_CODED_ON
             BUILD_GITHUB_PLUGIN=ON

=== Reason ===
GITHUB_GETLIBLIST::repoURL2listURL hardcodes the repository list to use the /orgs/repos API, as opposed to the /users/repos API, which only exists for GitHub organizations, not personal user accounts.

=== Possible Solutions ===
* Use /users/repos API, which yields equivalent results (missing permissions attribute and different default sort order) for all GitHub organizations I have tried
* Try one, then the other
* Somehow do a lookup for whether the GitHub ID is a user or an organization
* Provide radio button, preference option, ...

Related branches

Where are your footprint files? I looked in your github repo and I
cannot find any footprint (.kicad_mod) files. Here is an example of
what your library should look like:

https://github.com/KiCad/TO_SOT_Packages_SMD.pretty

On 6/28/2016 5:32 PM, Johannes Larsen wrote:
> Public bug reported:
>
> === Reproduce ===
> 1. open pcbnew
> 2. open Preferences -> Footprint Libraries Wizard
> 3. select Github repository
> 4. replace URL with one to a personal GitHub user (e.g. https://github.com/johslarsen)
> 5. click Next
>
> === Error Message ===
> https GET command failed
> Cannot get/download data from: 'https://api.github.com/orgs/johslarsen/repos?per_page=99&page=1'
> Reason: 'Not found'
>
> === Version Information ===
> Application: kicad
> Version: 4.0.2-stable release build
> wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1010,GCC 6.1.1,wx containers,compatible with 2.8)
> Platform: Linux 4.6.3-1-ARCH x86_64, 64 bit, Little endian, wxGTK
> Boost version: 1.60.0
> USE_WX_GRAPHICS_CONTEXT=OFF
> USE_WX_OVERLAY=OFF
> KICAD_SCRIPTING=ON
> KICAD_SCRIPTING_MODULES=ON
> KICAD_SCRIPTING_WXPYTHON=ON
> USE_FP_LIB_TABLE=HARD_CODED_ON
> BUILD_GITHUB_PLUGIN=ON
>
> === Reason ===
> GITHUB_GETLIBLIST::repoURL2listURL hardcodes the repository list to use the /orgs/repos API, as opposed to the /users/repos API, which only exists for GitHub organizations, not personal user accounts.
>
> === Possible Solutions ===
> * Use /users/repos API, which yields equivalent results (missing permissions attribute and different default sort order) for all GitHub organizations I have tried
> * Try one, then the other
> * Somehow do a lookup for whether the GitHub ID is a user or an organization
> * Provide radio button, preference option, ...
>
> ** Affects: kicad
> Importance: Undecided
> Status: New
>

Johannes Larsen (johslarsen) wrote :

In repositories ending with .pretty (e.g. https://github.com/johslarsen/Misc.pretty), but the problem occurs in the API call that fetches the list of repositories, so it does not return any repositories at all.

OK I see what's going on. I'll see if someone has time to look at this.
 You should be able to use personal github repos.

On 7/11/2016 10:54 AM, Johannes Larsen wrote:
> In repositories ending with .pretty (e.g.
> https://github.com/johslarsen/Misc.pretty), but the problem occurs in
> the API call that fetches the list of repositories, so it does not
> return any repositories at all.
>

Wayne Stambaugh (stambaughw) wrote :

I just confirmed this. Would one of our github plugin devs look to see if this can be fixed? I don't see any reason why a user couldn't use their own github repos. My preference would be to not hard code the /org path in the github plugin. Is it possible to ping github to see what type of account it is? This seems like the most logical solution.

Nick Østergaard (nickoe) wrote :

I think this might just be an issue with the libries wizard. I have used personal pretty repos before by adding them directly to the library table.

Johannes Larsen (johslarsen) wrote :

Nick: Yeah, I might not have been clear enough about that. Yes, this only affects the library wizard for selecting repos, not the external personal github repos themselves.

I also use personal pretty repos in my projects without any problems, but I have to add them manually because the wizard only works for github organizations.

Novak Tamas (novak-7) on 2016-07-18
Changed in kicad:
status: New → Triaged
importance: Undecided → Low
Changed in kicad:
status: Triaged → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers