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

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

Closed
golivag opened this issue May 1, 2020 · 3 comments
Closed

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

golivag opened this issue May 1, 2020 · 3 comments
Milestone

Comments

@golivag
Copy link

golivag commented May 1, 2020

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
Copy link

ptthiem commented May 1, 2020

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
Copy link
Member

ocaisa commented May 1, 2020 via email

@boegel boegel added this to the next release (4.2.1?) milestone May 2, 2020
@boegel
Copy link
Member

boegel commented May 2, 2020

Already fixed in easybuilders/easybuild-framework#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).

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

4 participants