Git Product home page Git Product logo

Comments (21)

kasbah avatar kasbah commented on June 8, 2024 1

Ok, thanks. Maybe it's a unicode or other encoding issue, if you have installed, or could install something (git-bash or Ubuntu Sub-system for Windows), which has a file program or have some other way of finding out the encoding of the different files? If I run file on my fp-lib-table for instance it says:

$ file fp-lib-table
fp-lib-table: ASCII text

If I put a Greek character in there:

fp-lib-table: UTF-8 Unicode text

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

Hey, you probably don't have the right location for it there but am not exactly sure what it is under Windows. A quick search suggests something like /Users/[user]/%AppData%/Roaming/kicad but you might just have to search for %appdata% according to: https://forum.kicad.info/t/kicad-github-pcb-footprint-libraries/119/7

Remember you have to restart KiCad for it to take effect.

from kicad_footprints.

test-in-prod avatar test-in-prod commented on June 8, 2024

Right, that does seem like the correct path (with an existing fp-lib-table file there already): C:\Users\%username%\AppData\Roaming\kicad. When I replaced it with the generated one, I am getting the following error when launching CvPcb.

image

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

from kicad_footprints.

test-in-prod avatar test-in-prod commented on June 8, 2024

Here it is

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

That looks fine to me, I can't figure out what the issue is. Do you have a backup of your old fp-lib-table?

from kicad_footprints.

test-in-prod avatar test-in-prod commented on June 8, 2024

Here's the default one installed with kicad

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

Let me know if you have any luck with fixing this, I would love to add instructions for Windows users.

from kicad_footprints.

test-in-prod avatar test-in-prod commented on June 8, 2024

Sorry, been out the past couple of days.

Yes, restoring the original file and CvPcb launches just fine.

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

Hmm, maybe the way Python writes the paths on Windows (with \) isn't supported by KiCad. Could you add one of the libs on your hard disk through the GUI and paste the updated fp-lib-table?

Edit: Although I am not sure why it wouldn't be able to read the initial ( properly in that case, which is what, if i am deciphering it correctly, your error message seems to be complaining about.

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

@CryptonZylog, I managed to get some time on a Windows 7 machine and test things out. It did indeed seem to be an issue with paths which KiCad expects to use a Unix style path seperator but Python uses a Windows style. Could you git fetch origin && git checkout origin/windows and test with that?

from kicad_footprints.

test-in-prod avatar test-in-prod commented on June 8, 2024

Still getting the same error.
The fp-lib-table I noticed does have forward slashes now. I wonder if there's an issue with running KiCad on Win 10?

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

I have never heard that but haven't tried it myself. It seems like it works fine if you don't use the script to generate the table right? I guess I have to test on Windows 10 myself though.

The error message you posted above, which uses Cyrillic alphabet, it's saying it expected a ( at line 1 character 1 right? Do any footprints show up at all when you get that error?

Would be able to open the working table in a text editor and copy one of the (lib ... expressions across from the not working one and see what that does?

from kicad_footprints.

test-in-prod avatar test-in-prod commented on June 8, 2024

I've ran the python script again to re-generate the fp-lib-table file and noticed the forward slashes. Correct, it's not liking the line 1, char 1 for some reason. No footprints show up and CvPcb occasionally crashes.

Would be able to open the working table in a text editor and copy one of the (lib ... expressions across from the not working one and see what that does?

Let me get back to you soon on that one.

from kicad_footprints.

test-in-prod avatar test-in-prod commented on June 8, 2024

Have Cygwin installed and this is what I got:

$ file fp-lib-table
fp-lib-table: Little-endian UTF-16 Unicode text, with CRLF, CR line terminators

from kicad_footprints.

test-in-prod avatar test-in-prod commented on June 8, 2024

Just made some progress on this! Good thought about encoding and line endings.

I opened fp-lib-table in Notepad++ then decided to re-encode with UTF-8 without BOM and change line endings to unix-style. CvPcb after a long wait, finally loaded. And I could even load some footprints!

$ file fp-lib-table
fp-lib-table: ASCII text

However, it seems few errors now still creep up. Got an error window with the following:

PARSE_ERROR: Expecting 'circle, rectangle, oval, or trapezoid' в вводе/источнике 'C:\Users\crypton\Documents\Code\kicad_footprints\lowstar\IPC7351C-Nominal.pretty\CAPC160X80X87L35N.kicad_mod' строка 24 смещение 14 из C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad/common/dsnlexer.cpp : Expecting() : line 369
PARSE_ERROR: Expecting 'circle, rectangle, oval, or trapezoid' в вводе/источнике 'C:\Users\crypton\Documents\Code\kicad_footprints\PatrickBaus\footprints.pretty\jumper_solder_large.kicad_mod' строка 9 смещение 14 из C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad/common/dsnlexer.cpp : Expecting() : line 369
PARSE_ERROR: Expecting 'circle, rectangle, oval, or trapezoid' в вводе/источнике 'C:\Users\crypton\Documents\Code\kicad_footprints\Toroid-io\toroid-kicad.pretty\U-PDFN-8.kicad_mod' строка 13 смещение 14 из C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad/common/dsnlexer.cpp : Expecting() : line 369
PARSE_ERROR: Expecting 'circle, rectangle, oval, or trapezoid' в вводе/источнике 'C:\Users\crypton\Documents\Code\kicad_footprints\adamjvr\KiCAD-OnHand-Lib\OnHand-Components.pretty\BLM15HG601SN1D.kicad_mod' строка 16 смещение 14 из C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad/common/dsnlexer.cpp : Expecting() : line 369

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

from kicad_footprints.

test-in-prod avatar test-in-prod commented on June 8, 2024

Was using PowerShell, then python generate_table > fp-lib-table

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

I pushed a version to the windows branch that uses codec.open instead of a shell redirect. Could you try that please? Also, could you give me the PowerShell version of these instructions?

from kicad_footprints.

kasbah avatar kasbah commented on June 8, 2024

Hey @CryptonZylog I expect the issue is resolved with #9. Would be good to get confirmation though.

from kicad_footprints.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.