easybuilders / easybuild

EasyBuild - building software with ease
http://easybuild.io
GNU General Public License v2.0
464 stars 143 forks source link

eb fails when installing Python/3.7.4-GCCcore-8.3.0 #619

Closed golivag closed 4 years ago

golivag commented 4 years ago

Hi, I'm trying to install R-3.6.2-foss-2019b.eb on debian 10.

gcc (Debian 8.3.0-6) 8.3.0 Python 2.7.16

Python/3.7.4-GCCcore-8.3.0 fails with this error:

Python
ERROR: Traceback (most recent call last):
  File "/opt/software/easybuild/debian/10/software/EasyBuild/4.2.0/lib/python2.7/site-packages/easybuild/main.py", line 114, in build_and_install_software
    (ec_res['success'], app_log, err) = build_and_install_one(ec, init_env)
  File "/opt/software/easybuild/debian/10/software/EasyBuild/4.2.0/lib/python2.7/site-packages/easybuild/framework/easyblock.py", line 3183, in build_and_install_one
    result = app.run_all_steps(run_test_cases=run_test_cases)
  File "/opt/software/easybuild/debian/10/software/EasyBuild/4.2.0/lib/python2.7/site-packages/easybuild/framework/easyblock.py", line 3087, in run_all_steps
    self.run_step(step_name, step_methods)
  File "/opt/software/easybuild/debian/10/software/EasyBuild/4.2.0/lib/python2.7/site-packages/easybuild/framework/easyblock.py", line 2926, in run_step
    step_method(self)()
  File "/opt/software/easybuild/debian/10/software/EasyBuild/4.2.0/lib/python2.7/site-packages/easybuild/easyblocks/generic/configuremake.py", line 180, in fetch_step
    super(ConfigureMake, self).fetch_step(*args, **kwargs)
  File "/opt/software/easybuild/debian/10/software/EasyBuild/4.2.0/lib/python2.7/site-packages/easybuild/framework/easyblock.py", line 1795, in fetch_step
    self.exts = self.fetch_extension_sources(skip_checksums=skip_checksums)
  File "/opt/software/easybuild/debian/10/software/EasyBuild/4.2.0/lib/python2.7/site-packages/easybuild/framework/easyblock.py", line 520, in fetch_extension_sources
    src_fn = self.obtain_file(fn, extension=True, urls=source_urls, force_download=force_download)
  File "/opt/software/easybuild/debian/10/software/EasyBuild/4.2.0/lib/python2.7/site-packages/easybuild/framework/easyblock.py", line 727, in obtain_file
    alt_url = derive_alt_pypi_url(fullurl)
  File "/opt/software/easybuild/debian/10/software/EasyBuild/4.2.0/lib/python2.7/site-packages/easybuild/tools/filetools.py", line 519, in derive_alt_pypi_url
    cand_urls = pypi_source_urls(pkg_name)
  File "/opt/software/easybuild/debian/10/software/EasyBuild/4.2.0/lib/python2.7/site-packages/easybuild/tools/filetools.py", line 498, in pypi_source_urls
    parsed_html = ElementTree.parse(urls_html)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  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 1659, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 143, column 306

any hint welcome. Thanks

ptthiem commented 4 years ago

Adding to this.I have experienced this also. It seems that the pypi_urls.html file being downloaded from PYPI and being parsed now contains lines looking like:

    <a href="..." data-requires-python="..." data-yanked>pip-20.0-py2.py3-none-any.whl</a><br/>
    <a href="..." data-requires-python="..." data-yanked>pip-20.0.tar.gz</a><br/>

the "data-yanked" attributes are potentially valid HTML but "not well-formed" XML. Replacing the string data-yanked> with data-yanked="1"> after reading the file into a string just before line 498 in filetools.py has allowed my build to continue for now. However, this feels like a hack, I would assume that one is suppose to ignore these lines; perhaps it would be better to strip out any line with the offending mal-formed XML. I can't remember if the PY XML parser can be set to be more forgiving.

ocaisa commented 4 years ago

This was fixed upstream during the week and will be in the next release, see https://github.com/easybuilders/easybuild-framework/pull/3303

On Fri, 1 May 2020, 23:02 Philip Thiem, notifications@github.com<mailto:notifications@github.com> wrote:

Adding to this.I have experienced that. It seems that the pypi_urls.html file being downloaded from PYPI and being parsed now contains lines looking like:

<a href="..." data-requires-python="..." data-yanked>pip-20.0-py2.py3-none-any.whl</a><br/>
<a href="..." data-requires-python="..." data-yanked>pip-20.0.tar.gz</a><br/>

the "data-yanked" attributes are potentially valid HTML but "not well-formed" XML. Replacing the string data-yanked> with data-yanked="1"> after reading the file into a string just before line 498 in filetools.py has allowed my build to continue for now. However, this feels like a hack, I would assume that one is suppose to ignore these lines; perhaps it would be better to strip out any line with the offending mal-formed XML. I can't remember if the PY XML parser can be set to be more forgiving.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/easybuilders/easybuild/issues/619#issuecomment-622567152, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA5JTNKALV2VQBDWFM4WGVDRPM2IBANCNFSM4MXEWYLQ.



Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Volker Rieke Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt


boegel commented 4 years ago

Already fixed in https://github.com/easybuilders/easybuild-framework/pull/3303, so closing. The fix will be included with the upcoming EasyBuild v4.2.1 release (or you can manually apply the fix from https://github.com/easybuilders/easybuild-framework/pull/3303/files#diff-80e271b8fd31ff4cff170771374ccbe2 to your EasyBuild installation.

@golivag @ptthiem The problem should only manifest itself when trying to download sources from PyPI. As a workaround, you can manually downloaded the source tarball yourself, and put in the "source path" where EasyBuild looks for pre-downloaded source tarballs (see output of eb --show-config for the source path location).