Giter Site home page Giter Site logo

Comments (3)

clelange avatar clelange commented on July 29, 2024

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.

AndreasAlbert avatar AndreasAlbert commented on July 29, 2024

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.

See build log

from hepdata_lib.

AndreasAlbert avatar AndreasAlbert commented on July 29, 2024

(It does succeed starting from a PNG, though. Only PDF inputs fail.)

from hepdata_lib.

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.