Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

build.py errors for Python 3.6 on Windows #12

Closed
lbianchi-lbl opened this issue Nov 20, 2020 · 0 comments · Fixed by #13
Closed

build.py errors for Python 3.6 on Windows #12

lbianchi-lbl opened this issue Nov 20, 2020 · 0 comments · Fixed by #13
Assignees
Labels
bug Something isn't working

Comments

@lbianchi-lbl
Copy link
Contributor

This error came up by running the tests from this repo as part of the IDAES/idaes-pse integration tests. Here's the error log:

============================= test session starts =============================
platform win32 -- Python 3.6.8, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
rootdir: D:\a\idaes-pse\idaes-pse\examples-pse, configfile: pytest.ini
plugins: cov-2.10.1
collected 1 item / 2 errors

=================================== ERRORS ====================================
_________________ ERROR collecting tests/test_build_script.py _________________
tests\test_build_script.py:18: in <module>
    import build
build.py:120: in <module>
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
E   AttributeError: module 'asyncio' has no attribute 'WindowsSelectorEventLoopPolicy'
------------------------------- Captured stdout -------------------------------
path: ['D:\\a\\idaes-pse\\idaes-pse\\examples-pse', 'D:\\a\\idaes-pse\\idaes-pse\\examples-pse\\tests', 'C:\\hostedtoolcache\\windows\\Python\\3.6.8\\x64\\Scripts\\pytest.exe', 'c:\\hostedtoolcache\\windows\\python\\3.6.8\\x64\\python36.zip', 'c:\\hostedtoolcache\\windows\\python\\3.6.8\\x64\\DLLs', 'c:\\hostedtoolcache\\windows\\python\\3.6.8\\x64\\lib', 'c:\\hostedtoolcache\\windows\\python\\3.6.8\\x64', 'c:\\hostedtoolcache\\windows\\python\\3.6.8\\x64\\lib\\site-packages', 'c:\\hostedtoolcache\\windows\\python\\3.6.8\\x64\\lib\\site-packages\\win32', 'c:\\hostedtoolcache\\windows\\python\\3.6.8\\x64\\lib\\site-packages\\win32\\lib', 'c:\\hostedtoolcache\\windows\\python\\3.6.8\\x64\\lib\\site-packages\\Pythonwin']
__________________ ERROR collecting tests/test_notebooks.py ___________________
tests\test_notebooks.py:17: in <module>
    import build
build.py:120: in <module>
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
E   AttributeError: module 'asyncio' has no attribute 'WindowsSelectorEventLoopPolicy'

. It seems to be limited to the specific combination Python 3.6 and Windows, and wasn't caught by the tests here in examples-pse because the CI is not running on the full Python version and OS test matrix just yet (which will be rectified ASAP).

I think the fix shouldn't be too hard, essentially just add a special case within the special case in build.py#L117-120.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant