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

osx1011 Python error #2238

Closed
mmarchini opened this issue Mar 19, 2020 · 7 comments
Closed

osx1011 Python error #2238

mmarchini opened this issue Mar 19, 2020 · 7 comments

Comments

@mmarchini
Copy link
Contributor

osx tests have been failing for the past ~12h on osx1011. The stack trace is:

07:09:15 ERROR:root:code for hash sha512 was not found.
07:09:15 Traceback (most recent call last):
07:09:15   File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
07:09:15     globals()[__func_name] = __get_hash(__func_name)
07:09:15   File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
07:09:15     raise ValueError('unsupported hash type ' + name)
07:09:15 ValueError: unsupported hash type sha512
07:09:15 Traceback (most recent call last):
07:09:15   File "tools/inspector_protocol/code_generator.py", line 690, in <module>
07:09:15     main()
07:09:15   File "tools/inspector_protocol/code_generator.py", line 574, in main
07:09:15     jinja_env = initialize_jinja_env(jinja_dir, config.protocol.output, config)
07:09:15   File "tools/inspector_protocol/code_generator.py", line 177, in initialize_jinja_env
07:09:15     import jinja2
07:09:15   File "/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1011/tools/inspector_protocol/jinja2/__init__.py", line 36, in <module>
07:09:15     from jinja2.loaders import BaseLoader, FileSystemLoader, PackageLoader, \
07:09:15   File "/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1011/tools/inspector_protocol/jinja2/loaders.py", line 16, in <module>
07:09:15     from hashlib import sha1
07:09:15 ImportError: cannot import name sha1

Looking at our issue tracker, it seems we made some changes to OSX recently (installed cmake)? Could this be a side effect (the timestamps match)? Maybe some other dependency got corrupted while installing cmake. Or is this unrelated? cc @AshCripps

@mmarchini
Copy link
Contributor Author

mmarchini commented Mar 19, 2020

Saw suggestions online to reinstall Python using brew reinstall python@2, but it seems like Homebrew made it harder to install Python 2 since it's going EOL. Looking at alternatives

Edit: brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/86a44a0a552c673a05f11018459c9f5faae3becc/Formula/python@2.rb seems to be working (at least it is installing). Let's hope it fixes the issue.

@mmarchini
Copy link
Contributor Author

Seems to be working: https://ci.nodejs.org/job/node-test-commit-osx/32769/nodes=osx1011/console

It's building, before it was failing on ./configure.

@mmarchini
Copy link
Contributor Author

Based on that, maybe we should bump the priority on moving to Python 3 on OS X? I'm pretty sure our ansible scripts will not work to reprovision the machines if they try to install Python 2.

@richardlau
Copy link
Member

Based on that, maybe we should bump the priority on moving to Python 3 on OS X? I'm pretty sure our ansible scripts will not work to reprovision the machines if they try to install Python 2.

Efforts are underway to set up new macOS test and release machines (see #2188 and #2236). It would probably make sense for those to only have Python 3.

@AshCripps
Copy link
Member

The latest macs added (10.15s at Nearform) have both python2 and python3:

administrator@test-nearform-macos10 ~ % python -V
Python 2.7.16
administrator@test-nearform-macos10 ~ % python3 -V
Python 3.7.7
administrator@test-nearform-macos10 ~ % which python
/usr/bin/python
administrator@test-nearform-macos10 ~ % which python3
/usr/local/bin/python3
administrator@test-nearform-macos10 ~ %

Only python3 is installed through brew

'macos10.15': [
'cmake,python,ccache'
],

So I guess the python2 is there in the base mac image (which I made late 2019/early 2020) so hopefully the new ones in ORKA don't have python2

@mmarchini
Copy link
Contributor Author

I forgot to fix test-macstadium-macos10.11-x64-1 yesterday, but it should be working now.

@mmarchini
Copy link
Contributor Author

Closing as this seems to be resolved

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

3 participants