Giter Club home page Giter Club logo

Comments (11)

DanChianucci avatar DanChianucci commented on September 26, 2024

That probably is what the issue is. If you can find where in the code
"untitled.lbr" is and replace it with input("Filename: ") it should fix
that issue. I can't promise it will fix the other issues having to deal
with the file paths. If you could put an issue in the issue tracker I'll
get to it eventually. Sorry I'm not more help, I haven't had much time to
work on this project.

Alternatively you could just rename the .lbr file to untitled.lbr

I must warn you library conversion doesn't convert the schematic symbols
very well (especially multi gated parts).

The good news is it looks like kicad will be getting native eagle support
soon.
On Jun 30, 2012 8:28 PM, "samuelvanderwaal" <
[email protected]>
wrote:

Hi. I have all the .py files in the same directory and am trying to run
the "Library.py" file in order to convert an Eagle library of footprints
(.lbr). The error I get is:

Traceback (most recent call last):
File "Library.py", line 85, in
node = ElementTree(file=fileName)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 611, in init
self.parse(file)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: 'untitled.lbr'

I'm not a programmer, but when I look at the code it appears that the
"input" function is commented out and the "fileName" variable is assigned
"untitled.lbr". Is this test code that you forgot to finalize or do I not
understand how this works?


Reply to this email directly or view it on GitHub:
#7

from eagle2kicad.

samuelvanderwaal avatar samuelvanderwaal commented on September 26, 2024

Thanks for the fast response. I tried both renaming my library to "untitled" and going into the code and changing the "untitled" to the name of my library. Neither approach seemed to work. Also, I tried modifying the code to use the input function to request the file name but that did not work either. As I am not a programmer I can't say I did that correctly, though. It's good to hear KiCad will be getting support for Eagle.

"If you could put an issue in the issue tracker I'll get to it eventually."

This is my first time using GitHub, so how do I go about putting an issue in the issue tracker? I thought that's what this thread was.

from eagle2kicad.

DanChianucci avatar DanChianucci commented on September 26, 2024

Oh duh... I got an email and assumed it was just an email when really it
was an issue tracker notification... :P

Has the error your getting changed. If so is it now something about being
unable to find suchandsuch module? If so I'll see if I can fix it soon
On Jun 30, 2012 10:56 PM, "samuelvanderwaal" <
[email protected]>
wrote:

Thanks for the fast response. I tried both renaming my library to
"untitled" and going into the code and changing the "untitled" to the name
of my library. Neither approach seemed to work. Also, I tried modifying
the code to use the input function to request the file name but that did
not work either. As I am not a programmer I can't say I did that
correctly, though. It's good to hear KiCad will be getting support for
Eagle.

"If you could put an issue in the issue tracker I'll get to it eventually."

This is my first time using GitHub, so how do I go about putting an issue
in the issue tracker? I thought that's what this thread was.


Reply to this email directly or view it on GitHub:
#7 (comment)

from eagle2kicad.

samuelvanderwaal avatar samuelvanderwaal commented on September 26, 2024

If I change my .lbr file to "untitled" then the error I get is:

Traceback (most recent call last):
File "Library.py", line 85, in
node = ElementTree(file=fileName)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 611, in init
self.parse(file)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
parser.feed(data)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1643, in feed
self._raiseerror(v)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1507, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0

If I uncomment the input functions and delete the generic file names I get:

Input Filename: SparkFun2.lbr
Traceback (most recent call last):
File "Library.py", line 83, in
fileName= input("Input Filename: ")
File "", line 1, in
NameError: name 'SparkFun2' is not defined

where "SparkFun2.lbr" is my Eagle file. I have the "SparkFun2" file in the same directory as all the .py scripts. Times like these I really wish I knew how to program. I would love to be able to contribute to projects like these. Maybe when I finish grad school and am no longer working two jobs I'll teach myself. :)

from eagle2kicad.

DanChianucci avatar DanChianucci commented on September 26, 2024

Hi I think your issue has been fixed by. Download the newest version and see if it works

from eagle2kicad.

samuelvanderwaal avatar samuelvanderwaal commented on September 26, 2024

Doesn't seem to work still. If I copy my .lbr file to the Library folder it complains about not finding the Converter module. If I copy all .py files to a common folder with my .lbr file in the same directory I get this error:

Input Filename: SparkFun2.lbr
Traceback (most recent call last):
File "Library.py", line 79, in
fileName=input("Input Filename: ")
File "", line 1, in
NameError: name 'SparkFun2' is not defined

with "SparkFun2.lbr" being my Eagle library file.

from eagle2kicad.

DanChianucci avatar DanChianucci commented on September 26, 2024

Did you download a fresh copy of Eagle2Kicad?
What version of Python are you running?
What OS are you using?

I ask because I'm not sure what this error is. Are you just trying to convert the Spark-fun libraries on github?

from eagle2kicad.

samuelvanderwaal avatar samuelvanderwaal commented on September 26, 2024

Sorry to be such a pain. It's quite likely I'm simply doing something stupid. I was using the default Python which comes with Ubuntu 12.04 which was 2.7. I just upgraded to 3.2 and now the error I get is:

Traceback (most recent call last):
File "Library.py", line 87, in
node = ElementTree(file=fileName)
File "/usr/local/lib/python3.2/xml/etree/ElementTree.py", line 633, in init
self.parse(file)
File "/usr/local/lib/python3.2/xml/etree/ElementTree.py", line 678, in parse
parser.feed(data)
File "/usr/local/lib/python3.2/xml/etree/ElementTree.py", line 1670, in feed
self._raiseerror(v)
File "/usr/local/lib/python3.2/xml/etree/ElementTree.py", line 1543, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0

Previously it would allow me to enter the Input Filename and then would throw an error, now it lets me enter the Input Filename, Module Output Filename and Symbol Output Filename before it throws this error.

Edit: I just downloaded a fresh copy of the files and tried again with the same result. I am unfamiliar with GitHub but am assuming that the downloadable zip file contains the newest version of the code, correct?

from eagle2kicad.

DanChianucci avatar DanChianucci commented on September 26, 2024

That looks like an error in the xml file itself
"xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0"
And since its in the first line first character I'm guessing there is a blank line there?

from eagle2kicad.

DanChianucci avatar DanChianucci commented on September 26, 2024

I get similiar errors to this when I accidently try to convert an eagle file which was created with Eagle version <6.0

Make sure that the file you are trying to convert is the new file format. (open with a text editor, if there is a lot of garbage then its the old file format)

If it is the old file format you will need to open it in Eagle 6.0+ and re-save it.

from eagle2kicad.

samuelvanderwaal avatar samuelvanderwaal commented on September 26, 2024

Finally got around to trying this again and looks like this solves the problem. I re-saved a board file I was trying to convert, using Eagle 6.2 and it then successfully converted. Thanks!

from eagle2kicad.

Related Issues (20)

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.