Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pea export mostly fails with Eagle 7.5.0 #5

Closed
lorenzschmid opened this issue Dec 20, 2015 · 9 comments
Closed

pea export mostly fails with Eagle 7.5.0 #5

lorenzschmid opened this issue Dec 20, 2015 · 9 comments
Assignees

Comments

@lorenzschmid
Copy link

This issue has been replaced by issues #7 #8 #9 and #10.

Hi!

Looking for automation tools for Eagle I stumbled upon this great package. Unfortunately I struggled upon quite a few problems with the pea export function. Being not fluent in Python I will write them down here, hoping to at least somehow contribute.
Using the fairly new Eagle 7.5.0 I assume that most errors might be caused by changes in Eagle itself and these scripts not being adapted yet. Note that I use the current version of pea build from source.

Schematic -> PNG

Works great!

Schematic -> PDF

I wonder if this is even possible but since the PNG export worked like a charm I suppose that I shouldn't get the following error:

$ pea export schematic.sch pdf schematic.pdf
Traceback (most recent call last):
  File "/usr/local/bin/pea", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/site-packages/eagle_automation/pea.py", line 86, in main
    return eagle_automation.export.export_main(verbose=args['--verbose'])
  File "/usr/local/lib/python3.5/site-packages/eagle_automation/export.py", line 468, in export_main
    export_class(verbose=verbose).export(args['<input>'], layers, out_paths)
  File "/usr/local/lib/python3.5/site-packages/eagle_automation/export.py", line 57, in export
    script = self.write_script(extension, layers, out_paths)
  File "/usr/local/lib/python3.5/site-packages/eagle_automation/export.py", line 284, in write_script
    raise BadExtension
TypeError: exceptions must derive from BaseException

Schematic -> Bill of Material

Trying to export the BOM of a schematic I get first prompted with the following error message in Eagle, clicking on ok the ok then leads to the exception as noted further down:

screen shot 2015-12-20 at 12 14 23

$ pea export schematic.sch bom bill-of-material.json
WARNING:pea.eagle_automation.export:'Config' object has no attribute 'partdb'
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/eagle_automation-0.1.12-py3.5.egg/eagle_automation/export.py", line 273, in export
  File "/usr/local/lib/python3.5/site-packages/eagle_automation-0.1.12-py3.5.egg/eagle_automation/export.py", line 244, in export
AttributeError: 'Config' object has no attribute 'partdb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/pea", line 9, in <module>
    load_entry_point('eagle-automation==0.1.12', 'console_scripts', 'pea')()
  File "/usr/local/lib/python3.5/site-packages/eagle_automation-0.1.12-py3.5.egg/eagle_automation/pea.py", line 91, in main
  File "/usr/local/lib/python3.5/site-packages/eagle_automation-0.1.12-py3.5.egg/eagle_automation/export.py", line 484, in export_main
  File "/usr/local/lib/python3.5/site-packages/eagle_automation-0.1.12-py3.5.egg/eagle_automation/export.py", line 276, in export
  File "/usr/local/lib/python3.5/site-packages/eagle_automation-0.1.12-py3.5.egg/eagle_automation/export.py", line 98, in export
  File "/usr/local/lib/python3.5/site-packages/eagle_automation-0.1.12-py3.5.egg/eagle_automation/export.py", line 234, in clean
  File "/usr/local/lib/python3.5/site-packages/eagle_automation-0.1.12-py3.5.egg/eagle_automation/export.py", line 175, in generate_bom_output
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/b7/gym621fs0d18sgl9q7nr7c9h0000gn/T/tmp8382fym8/bom.json'

Layout -> PDF/PNG

When trying to export any layout to a pdf or png file Eagle prompts with two popups indicating a problem, whereby the second popup changes depending on which layer is selected:
screen shot 2015-12-20 at 12 16 11
screen shot 2015-12-20 at 12 16 27

Still an empty file is generated containing a timestamp and the file name.
It is worth noticing that while the png file is generated relative to path the command is launched, the pdf is always generated in the same folder as the layout:

pea export folder/layout.brd pdf layout.pdf:topmask

leads to the file folder/layout.pdf, while

pea export folder/layout.brd png layout.png:topmask

leads to the file layout.png.

Layout -> Gerber

Nothing happens...

@jpoa
Copy link

jpoa commented Jan 14, 2016

Greetings! I am using 7.3 here on some files that passed through 7.5 and I can report the same issues (I tested the exports, the only one working is png).

@guyzmo
Copy link
Owner

guyzmo commented Jan 14, 2016

Hi, I'm sorry I took some time off and did not attend the issue.

I still have not upgraded to 7.5, so I'll first try to replicate the issue with 7.4.0 before upgrading

@jpoa
Copy link

jpoa commented Jan 14, 2016

Hey there! No worries, I think we can only thank you for the tool and the time you invest in it! (and happy new year btw)

@jpoa
Copy link

jpoa commented Jan 14, 2016

Just another note, what I find curious on the BoM export is that if I run the ULP code you generated inside Eagle it works (I grabbed the temp file that you are creating and copied it somewhere else). If the code is executed via peait complains that it is not a schematic (when doing the schematic(SHC) command.

@guyzmo
Copy link
Owner

guyzmo commented Mar 17, 2016

sadly, I currently am without a proper eagle installation, and without the context in which I was able to work on the project, so it's a bit hard for me to replicate your issue.

Though, I'm pretty positive that the exports and the diff are working for me, I've been using them a lot on my last electronics project.

Issue ②

About the BOM exports, I have to look again at the code, as I have been experimenting on the possibility to handle an alternative database outside of eagle, but I never really finished the implementation ­— and lacks proper documentation. So that issue might better be setup as an independent issue, and that explains the AttributeError: 'Config' object has no attribute 'partdb' error you're getting. I guess I'll rollback that feature to make the whole sensibly more stable.

Issue ①

About the export to pdf issue, there's a problem with the exceptions I'm using which leads to you not understanding what went wrong:

TypeError: exceptions must derive from BaseException

which originally is a BadExtension issue. So, I believe that error is because it's not finding the pdf handling code, and the mystery to solve is to understand why… So I'd rather focus in this issue about that.

Issue ③

For your third issue, I'd need eagle source files that are similar to the project you're working on, as well as the eagle_automation configuration files. I'll need to be able to replicate the issue, and eventually even make it a regression test case.

@guyzmo
Copy link
Owner

guyzmo commented Mar 17, 2016

Closing as I split this issue into new ones.

@guyzmo guyzmo closed this as completed Mar 17, 2016
@lorenzschmid
Copy link
Author

Thank you for taking the time, good idea to split them up into individual issues - don't you want to add your explanations (issue 1-3) directly to them as well? And no worries for the delay!

@guyzmo
Copy link
Owner

guyzmo commented Mar 18, 2016

yup, good idea. Though for most of it I'll need to get a working eagle on that old computer, which I have no need of, besides eagle-automation. Also, if you could post a project similar (in terms of how you do things in eagle) to the one you're having issues with (for #9), that'd be great.

@lorenzschmid
Copy link
Author

no its me who is late - I was on holidays, sry. Concerning the project, I posted directly in #9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants