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

Make sure that Python measure tests work out of the box on clean OpenStudio install #4992

Closed
DavidGoldwasser opened this issue Oct 2, 2023 · 2 comments
Assignees
Labels
Triage Issue needs to be assessed and labeled, further information on reported might be needed

Comments

@DavidGoldwasser
Copy link
Collaborator

Either change sample measure test to use unittest or add Pytest to OpenStudio's Python environment.

@DavidGoldwasser DavidGoldwasser added the Triage Issue needs to be assessed and labeled, further information on reported might be needed label Oct 2, 2023
@DavidGoldwasser DavidGoldwasser added this to the OpenStudio SDK 3.7.0 milestone Oct 2, 2023
kbenne added a commit that referenced this issue Oct 3, 2023
The packages contained in python/requirements.txt will now be included
in the OpenStudio distribution by default.

ref #4992
jmarrec pushed a commit that referenced this issue Oct 30, 2023
The packages contained in python/requirements.txt will now be included
in the OpenStudio distribution by default.

ref #4992
@rajeee
Copy link

rajeee commented Oct 8, 2024

Looks like this should have been fixed through #5008 but I am still getting errors on Openstudio version: 3.8.0+f953b6fcaf, M1 Pro Mac, Ventura 13.7

openstudio test_model_measure.py

Traceback

Traceback (most recent call last):
File "", line 10, in
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/radhikar/Documents/OpenStudio/src/utilities/bcl/templates/ModelMeasure/tests/test_model_measure.py", line 150, in
pytest.main()
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/_pytest/config/init.py", line 155, in main
config = _prepareconfig(args, plugins)
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/_pytest/config/init.py", line 337, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/pluggy/_hooks.py", line 513, in call
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/pluggy/_callers.py", line 139, in _multicall
raise exception.with_traceback(exception.traceback)
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/_pytest/helpconfig.py", line 105, in pytest_cmdline_parse
config = yield
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/_pytest/config/init.py", line 1143, in pytest_cmdline_parse
self.parse(args)
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/_pytest/config/init.py", line 1492, in parse
self._preparse(args, addopts=addopts)
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/_pytest/config/init.py", line 1379, in _preparse
self.pluginmanager.load_setuptools_entrypoints("pytest11")
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/pluggy/_manager.py", line 421, in load_setuptools_entrypoints
plugin = ep.load()
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/_pytest/assertion/rewrite.py", line 178, in exec_module
exec(co, module.dict)
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/pytest_cov/plugin.py", line 9, in
import coverage
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/coverage/init.py", line 24, in
from coverage.control import (
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/coverage/control.py", line 28, in
from coverage.collector import Collector, HAS_CTRACER
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/coverage/collector.py", line 19, in
from coverage.data import CoverageData
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/coverage/data.py", line 24, in
from coverage.sqldata import CoverageData
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/coverage/sqldata.py", line 16, in
import sqlite3
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/sqlite3/init.py", line 23, in
from sqlite3.dbapi2 import *
File "/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/sqlite3/dbapi2.py", line 27, in
from _sqlite3 import *
ImportError: dlopen(/Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/lib-dynload/_sqlite3.cpython-38-darwin.so, 0x0002): Symbol not found: _sqlite3_enable_load_extension
Referenced from: <9F88F376-4444-3BC2-BD26-89AD0EF1CCEE> /Applications/OpenStudio-3.8.0/EnergyPlus/python_standard_lib/lib-dynload/_sqlite3.cpython-38-darwin.so
Expected in: <2EF69864-7D8D-3BA6-BBA3-46A6CDC7B1B9> /usr/lib/libsqlite3.dylib
Failed to execute '/Users/radhikar/Documents/OpenStudio/src/utilities/bcl/templates/ModelMeasure/tests/test_model_measure.py'

@jmarrec
Copy link
Collaborator

jmarrec commented Oct 9, 2024

This isn't the same issue at all. This issue should be close. I'm transfering it to #5271 @rajeee

@jmarrec jmarrec closed this as completed Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage Issue needs to be assessed and labeled, further information on reported might be needed
Projects
None yet
Development

No branches or pull requests

4 participants