ch-aurich / Eagle2FreeCad

Export your eagle boards to freecad, just like eagleUp does for Sketchup
23 stars 7 forks source link

Issues running on OSX/WIN 7 with FreeCAD 0.13 #2

Closed marcnicholas closed 11 years ago

marcnicholas commented 11 years ago

Hi,

I get the following traceback on a Mac with OSX Mountain Lion, Python 2.7.2, and FreeCAD 0.13:

Traceback (most recent call last): File "/Users/marc/Documents/Code/Eagle2FreeCad/eagle.FCMacro", line 191, in layerThicknesses = drawing.find('board/designrules/param[@name="mtCopper"]').attrib['value'] File "/Users/marc/Downloads/FreeCAD.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/etree/ElementPath.py", line 186, in find return _compile(path).find(element) File "/Users/marc/Downloads/FreeCAD.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/etree/ElementPath.py", line 176, in _compile p = Path(path) File "/Users/marc/Downloads/FreeCAD.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/etree/ElementPath.py", line 93, in init "expected path separator (%s)" % (op or tag) <type 'exceptions.SyntaxError'>: expected path separator ([)

ch-aurich commented 11 years ago

I cannot reproduce this issue on my lubuntu setup, but when googling for it I find a lot of hints that the way I use this code:

drawing.find('board/designrules/param[@name="mtCopper"]').attrib['value']

will work from python 2.7 on... When looking on your backtrace I see a lot of paths that have "2.6" in it, which makes me sure that you use python 2.6 even if python 2.7 is installed.

Please make sure that you use python >=2.7

marcnicholas commented 11 years ago

Hi there,

Part of the challenge is that on the Mac, there's a bundled version of Python embedded into FreeCAD -- literally. It happens to be still 2.6 despite other versons of FreeCAD seemingly being developed against 2.7.

I tried grabbing the 2.7 version of etree from my system install of Python to no avail. I'll try ripping out the bundled Python -- which may break FreeCAD for OSX -- and see what happens.

Thanks for the response! :)

-m

On Tue, Feb 19, 2013 at 5:13 PM, Christian Aurich notifications@github.comwrote:

I cannot reproduce this issue on my lubuntu setup, but when googling for it I find a lot of hints that the way I use this code:

drawing.find('board/designrules/param[@name="mtCopper"]').attrib['value']

will work from python 2.7 on... When looking on your backtrace I see a lot of paths that have "2.6" in it, which makes me sure that you use python 2.6 even if python 2.7 is installed.

Please make sure that you use python >=2.7

— Reply to this email directly or view it on GitHubhttps://github.com/ch-aurich/Eagle2FreeCad/issues/2#issuecomment-13803248.

Marc Nicholas Wimoto Technologies Inc. +1.416.414.6272

ch-aurich commented 11 years ago

I have a private request from someone who also uses a bundled version for windows, which also includes python 2.6. I will try to find a workaround for that...

Christian

ch-aurich commented 11 years ago

could you please test the macro again? I cannot test it at the moment, so I would be glad to hear if it works...

marcnicholas commented 11 years ago

Hi,

Got a little further, now get stuck here:

Traceback (most recent call last): File "/Users/marc/Documents/Code/Eagle2FreeCad/eagle.FCMacro", line 231, in for elem in drawing.iterfind('board/plain/wire'): <type 'exceptions.AttributeError'>: iterfind

Thanks.

-m

On 2013-02-25, at 7:31 AM, Christian Aurich notifications@github.com wrote:

could you please test the macro again? I cannot test it at the moment, so I would be glad to hear if it works...

— Reply to this email directly or view it on GitHub.

vheimburger commented 11 years ago

The same with win7:

Traceback (most recent call last): File "..../eagle.fcmacro.FCMacro", line 231, in for elem in drawing.iterfind('board/plain/wire'): AttributeError: _ElementInterface instance has no attribute 'iterfind'

: Best regards
kevinfodor commented 11 years ago

Hello,

I am using Win7 and FreeCAD 0.13 Having what I think is a similar problem when loading my board

matplotlib not found, Plot module will be disabled Workplane x=Vector (1, 0, 0) y=Vector (0, 1, 0) z=Vector (0, 0, 1) pycollada not found, collada support will be disabled. Traceback (most recent call last): File "C:/projects/Eagle2FreeCad/eagle.FCMacro", line 231, in for elem in drawing.iterfind('board/plain/wire'): <type 'exceptions.AttributeError'>: _ElementInterface instance has no attribute 'iterfind'

OS: Windows 7 Platform: 32-bit Version: 0.13.1828 Python version: 2.6.2 Qt version: 4.5.2 Coin version: 3.1.0 SoQt version: 1.4.1 OCC version: 6.3.0

ch-aurich commented 11 years ago

Could someone please try it again? I'm still on a business trip and have no pc with windows 7 for testing with me

kevinfodor commented 11 years ago

I am using Win7. That did it! Thanks! :+1: :smile:

marcnicholas commented 11 years ago

That got me further on OSX too. (FreeCAD 0.13, Mountain Lion).

Thanks!

-m

On 2013-02-26, at 5:27 PM, Kevin Fodor notifications@github.com wrote:

I am using Win7. That did it! Thanks!

— Reply to this email directly or view it on GitHub.

vheimburger commented 11 years ago

I use Win7 64bit, Freecad crashed while importing the brd File.

It is possible to import your sample board (muliboard). But not my own board with step-parts in the lib (I sent you the board with PM) In addition it is not possible to import my board with an empty lib.

After a restart of win7 it was only possible to import my board once with one step-part in the lib.

Only one test was successful with one part. All further tests failed and freecad crashed.

vheimburger commented 11 years ago

I Get a problem with a lib part ELCO6200-267.stp I send you the baord and th lib with PM Traceback (most recent call last): File "../eagle.fcmacro.FCMacro", line 465, in extruded = extruded.fuse(part) <type 'exceptions.Exception'>: BRep_API: command not done

vheimburger commented 11 years ago

Without this code i will have function.

combine pcb and part if the part is on this pcb

#for part in parts:
#  if extruded.isInside(part.Placement.Base, 0.000001, True):
#   print "part: ", part
#    extruded = extruded.fuse(part)
#    part.nullify()
ch-aurich commented 11 years ago

I close this issue here, because it is fixed, while the error vheimburger gets is related to another problem... I will open a new issue for that

marcnicholas commented 11 years ago

Agreed.

I'd be happy to test future fixes on OSX for you.

-m

On 2013-03-02, at 5:11 AM, Christian Aurich notifications@github.com wrote:

I close this issue here, because it is fixed, while the error vheimburger gets is related to another problem... I will open a new issue for that

— Reply to this email directly or view it on GitHub.