Comments (3)
Probably related, this is also causing issues when using SWAN (both python3 and legacy python stacks):
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-5-58ae0b37a4f9> in <module>
3 table.add_variable(exp)
4 submission.add_table(table)
----> 5 submission.create_files("example_output")
~/.local/lib/python3.6/site-packages/hepdata_lib/__init__.py in create_files(self, outdir)
478 # Write all the tables
479 for table in self.tables:
--> 480 table.write_output(outdir)
481
482 # Copy additional resource files
~/.local/lib/python3.6/site-packages/hepdata_lib/__init__.py in write_output(self, outdir)
229 :type outdir: string
230 """
--> 231 self.write_images(outdir)
232 self.write_yaml(outdir)
233
~/.local/lib/python3.6/site-packages/hepdata_lib/__init__.py in write_images(self, outdir)
251 command = "convert -flatten -fuzz 1% -trim +repage {} {}/{}".format(
252 image_file, outdir, out_image_file)
--> 253 command_ok = helpers.execute_command(command)
254 if not command_ok:
255 print("ImageMagick does not seem to be installed \
~/.local/lib/python3.6/site-packages/hepdata_lib/helpers.py in execute_command(command)
35 for line in proc.stderr:
36 result = result + line
---> 37 raise RuntimeError(result)
38 return True
39
RuntimeError: convert: UnableToOpenConfigureFile `magic.xml' @ warning/configure.c/GetConfigureOptions/714.
convert: UnableToOpenConfigureFile `delegates.xml' @ warning/configure.c/GetConfigureOptions/714.
convert: FailedToExecuteCommand `'gs' -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' '-sOutputFile=/tmp/magick-400EDeqaEdlyWFq%d' '-f/tmp/magick-400p772kieSgsyo' '-f/tmp/magick-400wdnbYQGQ4Erm'' (1) @ error/pdf.c/InvokePDFDelegate/291.
convert: NoImagesDefined `example_output/Figure_006-a.png' @ error/convert.c/ConvertImageCommand/3275.
from hepdata_lib.
I tried running the image conversion also in our tests in #73, but the conversion fails like this:
E RuntimeError: convert.im6: Postscript delegate failed `/home/travis/build/HEPData/hepdata_lib/examples/example_inputs/signalEffVsMass.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/677.
E convert.im6: no images defined `test_output/signalEffVsMass.png' @ error/convert.c/ConvertImageCommand/3044.
hepdata_lib/helpers.py:37: RuntimeError
While that error looks like there is a missing file, I do not think that that is possible, since our code explicitly checks the existence of the file before running the command.
from hepdata_lib.
(It does succeed starting from a PNG, though. Only PDF inputs fail.)
from hepdata_lib.
Related Issues (20)
- Refactor RootFileReader.retrieve_object
- submission.create_files() fails and wipes the directory clean HOT 7
- Make directory cleanup more robust HOT 2
- CMSSW setup instructions broken for CMSSW_12_X_Y and later
- Add docs for `add_additional_resource` and support `type` argument HOT 1
- Support reading arrays in C files using cfilereader
- Test all supported Python versions
- Change Zenodo record added to Submission to Concept DOI
- Drop Python 2 support HOT 3
- Yank broken Python 2 releases from PyPI with Python 3 only hepdata-validator dependencies HOT 3
- Current SWAN defaults are incompatible HOT 3
- Update readthedocs config
- Reporting a vulnerability HOT 1
- Add ability to read in YODA files HOT 10
- Pip(3) version is outdated HOT 2
- Upgrade Pylint to allow use with Python 3.11
- Add ability to specify license information HOT 2
- Allow dummy uncertainties for variable member with dummy (string) value HOT 4
- Upgrade to codecov/codecov-action@v4
- Possible workspace.json file submission + symerrors submission HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hepdata_lib.