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

Construct repository, html build fails with KeyError: '(' #7069

Closed
arekbulski opened this issue Jan 27, 2020 · 5 comments
Closed

Construct repository, html build fails with KeyError: '(' #7069

arekbulski opened this issue Jan 27, 2020 · 5 comments

Comments

@arekbulski
Copy link

Describe the bug
I am the current owner/maintainer of Construct project. Since I did some modifications today (I dropped support for Python 2.7 and 3.5 versions) the readthedocs docs do not build with success anymore.

To Reproduce
Steps to reproduce the behavior: In the docs website I click "Build version". It ends with error KeyError: '(' which is just unknown to me. Sometimes it ends with a different error, cannot import PackageFInder, but I am able to fix that one by going to Versions -> edit Latest -> wipe. This is not a problem. KeyError is.

Using "make html" locally builds successfully without problems. Its sphinx 1.6.7 local, I do not know the version that runs in readthedocs server.

Similar ticket: #5519

Build log: https://readthedocs.org/api/v2/build/10335619.txt
Related script file from the error: https://github.com/construct/construct/blob/master/construct/lib/binary.py#L101

Expected behavior
Successful build.

Your project
https://readthedocs.org/projects/construct/
https://github.com/construct/construct

Screenshots
Zrzut ekranu z 2020-01-27 18-09-40

@barbara-sfx
Copy link
Contributor

Our builds have been failing on RTD consistently on many branches for about a week. I reported it to RTD support and they did some wipes of our environments, but it hasn't solved the problem. They thought it might be related to a recent release of pip. I asked if it could be rolled back but haven't heard anything back.

This is seriously impacting our ability to test and review our docs (internal private branches), not to mention posting updated versions of our live docs at docs.signalfx.com.

My understanding is this an RTD problem, not a sphinx problem, so this might not be the right place to report it. But if someone here could raise a better alarm over at RTD, that could be very helpful.

@arekbulski
Copy link
Author

I appreciate the feedback.

@arekbulski
Copy link
Author

One thing I just noticed: the build logs mention python2.7 which my project just dropped. Is this a possible problem?

@tk0miya
Copy link
Member

tk0miya commented Jan 29, 2020

It seems the error was caused on installing construct package. I don't know why that happened. But it is not related with Sphinx.

[rtd-command-info] start-time: 2020-01-27T16:13:58.860752Z, end-time: 2020-01-27T16:14:00.242744Z, duration: 1, exit-code: 1
/home/docs/checkouts/readthedocs.org/user_builds/construct/envs/latest/bin/python /home/docs/checkouts/readthedocs.org/user_builds/construct/checkouts/latest/setup.py install --force
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/construct/checkouts/latest/setup.py", line 3, in <module>
    from construct.version import version_string
  File "/home/docs/checkouts/readthedocs.org/user_builds/construct/checkouts/latest/construct/__init__.py", line 22, in <module>
    from construct.core import *
  File "/home/docs/checkouts/readthedocs.org/user_builds/construct/checkouts/latest/construct/core.py", line 5, in <module>
    from construct.lib import *
  File "/home/docs/checkouts/readthedocs.org/user_builds/construct/checkouts/latest/construct/lib/__init__.py", line 2, in <module>
    from construct.lib.binary import *
  File "/home/docs/checkouts/readthedocs.org/user_builds/construct/checkouts/latest/construct/lib/binary.py", line 104, in <module>
    BITS2BYTES_CACHE = {bytes2bits(int2byte(i)):int2byte(i) for i in range(256)}
  File "/home/docs/checkouts/readthedocs.org/user_builds/construct/checkouts/latest/construct/lib/binary.py", line 104, in <dictcomp>
    BITS2BYTES_CACHE = {bytes2bits(int2byte(i)):int2byte(i) for i in range(256)}
  File "/home/docs/checkouts/readthedocs.org/user_builds/construct/checkouts/latest/construct/lib/binary.py", line 101, in bytes2bits
    return b"".join(BYTES2BITS_CACHE[b] for b in iterateints(data))
  File "/home/docs/checkouts/readthedocs.org/user_builds/construct/checkouts/latest/construct/lib/binary.py", line 101, in <genexpr>
    return b"".join(BYTES2BITS_CACHE[b] for b in iterateints(data))
KeyError: '('

@arekbulski
Copy link
Author

For disclosure, we managed to fix it by defining this yaml file to require higher python version:
https://docs.readthedocs.io/en/latest/config-file/v2.html#build-image

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants