Skip to content

docker-compose #9

@EEE-PNDC

Description

@EEE-PNDC

Hello

Please let me know the problem in building the docker-compose, I have installed all the dependencies and followed all instruction. but I cannot build the openFMB simulator. I am getting the following error.

docker-compose build

Step 7/10 : RUN echo "Installing required Python dependencies" && pip install -r requirements-dev.txt && echo "Running tests in the container environment" && pytest tests && echo "Cleaning up tests from the container environment" && rm -r /app/tests
---> Running in 02c49e8145eb
Installing required Python dependencies
Collecting asyncio-nats-client~=0.9
Downloading asyncio-nats-client-0.11.4.tar.gz (19 kB)
Collecting quart~=0.9
Downloading Quart-0.15.1-py3-none-any.whl (89 kB)
Collecting protobuf~=3.8
Downloading protobuf-3.17.1-py2.py3-none-any.whl (173 kB)
Collecting rx~=1.6
Downloading Rx-1.6.1-py2.py3-none-any.whl (179 kB)
Collecting codespell~=1.14
Downloading codespell-1.17.1-py3-none-any.whl (163 kB)
Collecting coverage~=4.5
Downloading coverage-4.5.4.tar.gz (385 kB)
Collecting flake8~=3.7
Downloading flake8-3.9.2-py2.py3-none-any.whl (73 kB)
Collecting flake8-builtins~=1.4
Downloading flake8_builtins-1.5.3-py2.py3-none-any.whl (12 kB)
Collecting flake8-docstrings~=1.3
Downloading flake8_docstrings-1.6.0-py2.py3-none-any.whl (5.7 kB)
Collecting flake8-rst-docstrings~=0.0.10
Downloading flake8-rst-docstrings-0.0.14.tar.gz (22 kB)
Collecting flake8-logging-format~=0.6
Downloading flake8-logging-format-0.6.0.tar.gz (5.1 kB)
Collecting flake8-pep3101~=1.2
Downloading flake8_pep3101-1.3.0-py2.py3-none-any.whl (11 kB)
Collecting flake8-string-format~=0.2
Downloading flake8_string_format-0.3.0-py2.py3-none-any.whl (7.3 kB)
Collecting pep8-naming~=0.8
Downloading pep8_naming-0.11.1-py2.py3-none-any.whl (8.4 kB)
Collecting pydocstyle~=3.0.0
Downloading pydocstyle-3.0.0-py3-none-any.whl (33 kB)
Collecting pytest~=5.0
Downloading pytest-5.4.3-py3-none-any.whl (248 kB)
Collecting pytest-asyncio~=0.10
Downloading pytest_asyncio-0.15.1-py3-none-any.whl (12 kB)
Collecting pytest-cov~=2.7
Downloading pytest_cov-2.12.0-py2.py3-none-any.whl (20 kB)
Collecting bandit~=1.6
Downloading bandit-1.7.0-py3-none-any.whl (115 kB)
Collecting click
Downloading click-8.0.1-py3-none-any.whl (97 kB)
Collecting hypercorn>=0.11.2
Downloading Hypercorn-0.11.2-py3-none-any.whl (54 kB)
Collecting jinja2
Downloading Jinja2-3.0.1-py3-none-any.whl (133 kB)
Collecting werkzeug>=2.0.0
Downloading Werkzeug-2.0.1-py3-none-any.whl (288 kB)
Collecting typing-extensions
Downloading typing_extensions-3.10.0.0-py3-none-any.whl (26 kB)
Collecting aiofiles
Downloading aiofiles-0.7.0-py3-none-any.whl (13 kB)
Collecting toml
Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting itsdangerous
Downloading itsdangerous-2.0.1-py3-none-any.whl (18 kB)
Collecting blinker
Downloading blinker-1.4.tar.gz (111 kB)
Collecting six>=1.9
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pyflakes<2.4.0,>=2.3.0
Downloading pyflakes-2.3.1-py2.py3-none-any.whl (68 kB)
Collecting importlib-metadata
Downloading importlib_metadata-4.0.1-py3-none-any.whl (16 kB)
Collecting pycodestyle<2.8.0,>=2.7.0
Downloading pycodestyle-2.7.0-py2.py3-none-any.whl (41 kB)
Collecting mccabe<0.7.0,>=0.6.0
Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting restructuredtext_lint
Downloading restructuredtext_lint-1.3.2.tar.gz (13 kB)
Collecting flake8-polyfill<2,>=1.0.2
Downloading flake8_polyfill-1.0.2-py2.py3-none-any.whl (7.3 kB)
Collecting snowballstemmer
Downloading snowballstemmer-2.1.0-py2.py3-none-any.whl (93 kB)
Collecting attrs>=17.4.0
Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting more-itertools>=4.0.0
Downloading more_itertools-8.8.0-py3-none-any.whl (48 kB)
Collecting pluggy<1.0,>=0.12
Downloading pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Collecting wcwidth
Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting packaging
Downloading packaging-20.9-py2.py3-none-any.whl (40 kB)
Collecting py>=1.5.0
Downloading py-1.10.0-py2.py3-none-any.whl (97 kB)
Collecting coverage[toml]>=5.2.1
Downloading coverage-5.5.tar.gz (691 kB)
Collecting PyYAML>=5.3.1
Downloading PyYAML-5.4.1.tar.gz (175 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting stevedore>=1.20.0
Downloading stevedore-3.3.0-py3-none-any.whl (49 kB)
Collecting GitPython>=1.0.1
Downloading GitPython-3.1.17-py3-none-any.whl (166 kB)
Collecting coverage[toml]>=5.2.1
Downloading coverage-5.4.tar.gz (687 kB)
Downloading coverage-5.3.1.tar.gz (684 kB)
Downloading coverage-5.3.tar.gz (693 kB)
Downloading coverage-5.2.1.tar.gz (694 kB)
INFO: pip is looking at multiple versions of attrs to determine which version is compatible with other requirements. This could take a while.
Collecting attrs>=17.4.0
Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Downloading attrs-20.2.0-py2.py3-none-any.whl (48 kB)
Downloading attrs-20.1.0-py2.py3-none-any.whl (49 kB)
Downloading attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Downloading attrs-19.2.0-py2.py3-none-any.whl (40 kB)
Downloading attrs-19.1.0-py2.py3-none-any.whl (35 kB)
Downloading attrs-18.2.0-py2.py3-none-any.whl (34 kB)
INFO: pip is looking at multiple versions of attrs to determine which version is compatible with other requirements. This could take a while.
Downloading attrs-18.1.0-py2.py3-none-any.whl (28 kB)
Downloading attrs-17.4.0-py2.py3-none-any.whl (31 kB)
INFO: pip is looking at multiple versions of bandit to determine which version is compatible with other requirements. This could take a while.
Collecting bandit~=1.6
Downloading bandit-1.6.2-py2.py3-none-any.whl (122 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
Downloading bandit-1.6.1-py2.py3-none-any.whl (122 kB)
Downloading bandit-1.6.0-py2.py3-none-any.whl (122 kB)
INFO: pip is looking at multiple versions of pytest-cov to determine which version is compatible with other requirements. This could take a while.
Collecting pytest-cov~=2.7
Downloading pytest_cov-2.11.1-py2.py3-none-any.whl (20 kB)
Downloading pytest_cov-2.11.0-py2.py3-none-any.whl (20 kB)
Downloading pytest_cov-2.10.1-py2.py3-none-any.whl (19 kB)
Collecting gitdb<5,>=4.0.1
Downloading gitdb-4.0.7-py3-none-any.whl (63 kB)
Collecting smmap<5,>=3.0.1
Downloading smmap-4.0.0-py2.py3-none-any.whl (24 kB)
Collecting priority
Downloading priority-1.3.0-py2.py3-none-any.whl (11 kB)
Collecting wsproto>=0.14.0
Downloading wsproto-1.0.0-py3-none-any.whl (24 kB)
Collecting h11
Downloading h11-0.12.0-py3-none-any.whl (54 kB)
Collecting h2>=3.1.0
Downloading h2-4.0.0-py3-none-any.whl (57 kB)
Collecting hpack<5,>=4.0
Downloading hpack-4.0.0-py3-none-any.whl (32 kB)
Collecting hyperframe<7,>=6.0
Downloading hyperframe-6.0.1-py3-none-any.whl (12 kB)
Collecting zipp>=0.5
Downloading zipp-3.4.1-py3-none-any.whl (5.2 kB)
Collecting pbr!=2.1.0,>=2.0.0
Downloading pbr-5.6.0-py2.py3-none-any.whl (111 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.0.1.tar.gz (18 kB)
Collecting pyparsing>=2.0.2
Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting docutils<1.0,>=0.11
Downloading docutils-0.17.1-py2.py3-none-any.whl (575 kB)
Building wheels for collected packages: asyncio-nats-client, coverage, flake8-rst-docstrings, flake8-logging-format, PyYAML, blinker, MarkupSafe, restructuredtext-lint
Building wheel for asyncio-nats-client (setup.py): started
Building wheel for asyncio-nats-client (setup.py): finished with status 'done'
Created wheel for asyncio-nats-client: filename=asyncio_nats_client-0.11.4-py3-none-any.whl size=22524 sha256=70e274a377c9fdd07ed74114b77be54859b8ba32b20c74ef188f0669dc94ef75
Stored in directory: /root/.cache/pip/wheels/e8/82/05/4bb5cb92202fa20f55e3a72b4ee1b5f828f1f63bbf10fd6ab8
Building wheel for coverage (setup.py): started
Building wheel for coverage (setup.py): finished with status 'done'
Created wheel for coverage: filename=coverage-4.5.4-py3-none-any.whl size=170505 sha256=487045dbc253a73a6573c5d00e581f52b61b617ceb72ea054e06f57999ba7712
Stored in directory: /root/.cache/pip/wheels/1e/78/ae/b5abc695292687dd8e369991947b1d5bcd1c0ac4d3223539a1
Building wheel for flake8-rst-docstrings (setup.py): started
Building wheel for flake8-rst-docstrings (setup.py): finished with status 'done'
Created wheel for flake8-rst-docstrings: filename=flake8_rst_docstrings-0.0.14-py2.py3-none-any.whl size=17168 sha256=80cf14b4bb5d20ba76606f8d26d4c0a62f5532d8e34699e784288ee1048ba33f
Stored in directory: /root/.cache/pip/wheels/63/74/29/56c38e61b1907e78a494a0e27708b45979276d57fe1ccb7e0d
Building wheel for flake8-logging-format (setup.py): started
Building wheel for flake8-logging-format (setup.py): finished with status 'done'
Created wheel for flake8-logging-format: filename=flake8_logging_format-0.6.0-py2.py3-none-any.whl size=5471 sha256=fcf91843516e3248181fcea82c885cd78f36b5297205844aa8e6c1e301ea7145
Stored in directory: /root/.cache/pip/wheels/72/60/30/73a6c5cf3395f9d7c8f90fe9299ceeee8e04b6e05bf38f773c
Building wheel for PyYAML (PEP 517): started
Building wheel for PyYAML (PEP 517): finished with status 'done'
Created wheel for PyYAML: filename=PyYAML-5.4.1-cp37-cp37m-linux_aarch64.whl size=45659 sha256=7c5d10dfffb2ca583d1ffb416da203a91ce84205d0567ea7fd538807dd3c9bc6
Stored in directory: /root/.cache/pip/wheels/f4/51/cc/858604f7bb9cab887106ff266a541546ad783b4fa20875051d
Building wheel for blinker (setup.py): started
Building wheel for blinker (setup.py): finished with status 'done'
Created wheel for blinker: filename=blinker-1.4-py3-none-any.whl size=13451 sha256=dd065c4c847b7f0e2f418eeade9fa09dee33845cfbd20db54b6370380a2fedc1
Stored in directory: /root/.cache/pip/wheels/22/f5/18/df711b66eb25b21325c132757d4314db9ac5e8dabeaf196eab
Building wheel for MarkupSafe (setup.py): started
Building wheel for MarkupSafe (setup.py): finished with status 'done'
Created wheel for MarkupSafe: filename=MarkupSafe-2.0.1-py3-none-any.whl size=9743 sha256=986c3f446dd7acdcf2685aa8469ec3d006d94aca2be53b38048b6cae89310ab5
Stored in directory: /root/.cache/pip/wheels/1a/18/04/e3b5bd888f000c2716bccc94a565239f9defc47ef93d9e7bea
Building wheel for restructuredtext-lint (setup.py): started
Building wheel for restructuredtext-lint (setup.py): finished with status 'done'
Created wheel for restructuredtext-lint: filename=restructuredtext_lint-1.3.2-py3-none-any.whl size=13666 sha256=5a5e2ad717bef044acd9338775ff3a033acd5a6cdd9e1a544b8d106a4cbd9dc8
Stored in directory: /root/.cache/pip/wheels/32/f9/1f/1bf1f220360fc5d61cba1e8da660d93c5e6335b0c77fc1008c
Successfully built asyncio-nats-client coverage flake8-rst-docstrings flake8-logging-format PyYAML blinker MarkupSafe restructuredtext-lint
Installing collected packages: zipp, typing-extensions, smmap, pyparsing, pyflakes, pycodestyle, mccabe, importlib-metadata, hyperframe, hpack, h11, wsproto, wcwidth, toml, snowballstemmer, six, py, priority, pluggy, pbr, packaging, more-itertools, MarkupSafe, h2, gitdb, flake8, docutils, attrs, werkzeug, stevedore, restructuredtext-lint, PyYAML, pytest, pydocstyle, jinja2, itsdangerous, hypercorn, GitPython, flake8-polyfill, coverage, click, blinker, aiofiles, rx, quart, pytest-cov, pytest-asyncio, protobuf, pep8-naming, flake8-string-format, flake8-rst-docstrings, flake8-pep3101, flake8-logging-format, flake8-docstrings, flake8-builtins, codespell, bandit, asyncio-nats-client
Successfully installed GitPython-3.1.17 MarkupSafe-2.0.1 PyYAML-5.4.1 aiofiles-0.7.0 asyncio-nats-client-0.11.4 attrs-21.2.0 bandit-1.7.0 blinker-1.4 click-8.0.1 codespell-1.17.1 coverage-4.5.4 docutils-0.17.1 flake8-3.9.2 flake8-builtins-1.5.3 flake8-docstrings-1.6.0 flake8-logging-format-0.6.0 flake8-pep3101-1.3.0 flake8-polyfill-1.0.2 flake8-rst-docstrings-0.0.14 flake8-string-format-0.3.0 gitdb-4.0.7 h11-0.12.0 h2-4.0.0 hpack-4.0.0 hypercorn-0.11.2 hyperframe-6.0.1 importlib-metadata-4.0.1 itsdangerous-2.0.1 jinja2-3.0.1 mccabe-0.6.1 more-itertools-8.8.0 packaging-20.9 pbr-5.6.0 pep8-naming-0.11.1 pluggy-0.13.1 priority-1.3.0 protobuf-3.17.1 py-1.10.0 pycodestyle-2.7.0 pydocstyle-3.0.0 pyflakes-2.3.1 pyparsing-2.4.7 pytest-5.4.3 pytest-asyncio-0.15.1 pytest-cov-2.10.1 quart-0.15.1 restructuredtext-lint-1.3.2 rx-1.6.1 six-1.16.0 smmap-4.0.0 snowballstemmer-2.1.0 stevedore-3.3.0 toml-0.10.2 typing-extensions-3.10.0.0 wcwidth-0.2.5 werkzeug-2.0.1 wsproto-1.0.0 zipp-3.4.1
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
Running tests in the container environment
============================= test session starts ==============================
platform linux -- Python 3.7.10, pytest-5.4.3, py-1.10.0, pluggy-0.13.1
rootdir: /app
plugins: cov-2.10.1, asyncio-0.15.1
collected 0 items / 10 errors

==================================== ERRORS ====================================
__________________ ERROR collecting tests/test_nats_server.py __________________
ImportError while importing test module '/app/tests/test_nats_server.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_nats_server.py:21: in
from openfmbsim.nats_server import create_server, NatsSubscriber, NatsPublisher
openfmbsim/nats_server.py:20: in
import reclosermodule_pb2 as rm
E ModuleNotFoundError: No module named 'reclosermodule_pb2'
____________________ ERROR collecting tests/test_server.py _____________________
ImportError while importing test module '/app/tests/test_server.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_server.py:18: in
from openfmbsim.server import main, parse_arguments
openfmbsim/server.py:21: in
from openfmbsim.nats_server import create_server
openfmbsim/nats_server.py:20: in
import reclosermodule_pb2 as rm
E ModuleNotFoundError: No module named 'reclosermodule_pb2'
_______________ ERROR collecting tests/test_simulated_device.py ________________
ImportError while importing test module '/app/tests/test_simulated_device.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_simulated_device.py:19: in
from openfmbsim.simulated_device import SimulatedDevice
openfmbsim/simulated_device.py:22: in
from .message import write_timestamp
openfmbsim/message.py:17: in
import commonmodule_pb2 as cm
E ModuleNotFoundError: No module named 'commonmodule_pb2'
_______________ ERROR collecting tests/test_simulated_system.py ________________
ImportError while importing test module '/app/tests/test_simulated_system.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_simulated_system.py:18: in
from openfmbsim.simulated_system import SimulatedSystem
openfmbsim/simulated_system.py:19: in
from .simulated_device import SimulatedDevice
openfmbsim/simulated_device.py:22: in
from .message import write_timestamp
openfmbsim/message.py:17: in
import commonmodule_pb2 as cm
E ModuleNotFoundError: No module named 'commonmodule_pb2'
__________________ ERROR collecting tests/test_web_server.py ___________________
ImportError while importing test module '/app/tests/test_web_server.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_web_server.py:18: in
from openfmbsim.simulated_system import SimulatedSystem
openfmbsim/simulated_system.py:19: in
from .simulated_device import SimulatedDevice
openfmbsim/simulated_device.py:22: in
from .message import write_timestamp
openfmbsim/message.py:17: in
import commonmodule_pb2 as cm
E ModuleNotFoundError: No module named 'commonmodule_pb2'
_________ ERROR collecting tests/devices/test_single_phase_breaker.py __________
ImportError while importing test module '/app/tests/devices/test_single_phase_breaker.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/devices/test_single_phase_breaker.py:17: in
from openfmbsim.devices.single_phase_breaker import SinglePhaseBreaker
openfmbsim/devices/single_phase_breaker.py:18: in
from .message import set_phase_a_mmxu
openfmbsim/devices/message.py:16: in
import commonmodule_pb2 as cm
E ModuleNotFoundError: No module named 'commonmodule_pb2'
________ ERROR collecting tests/devices/test_single_phase_generator.py _________
ImportError while importing test module '/app/tests/devices/test_single_phase_generator.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/devices/test_single_phase_generator.py:17: in
from openfmbsim.devices.single_phase_generator import SinglePhaseGenerator
openfmbsim/devices/single_phase_generator.py:18: in
from .message import set_bcr, set_phase_a_mmxu
openfmbsim/devices/message.py:16: in
import commonmodule_pb2 as cm
E ModuleNotFoundError: No module named 'commonmodule_pb2'
__________ ERROR collecting tests/devices/test_single_phase_meter.py ___________
ImportError while importing test module '/app/tests/devices/test_single_phase_meter.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/devices/test_single_phase_meter.py:17: in
from openfmbsim.devices.single_phase_meter import SinglePhaseMeter
openfmbsim/devices/single_phase_meter.py:18: in
from .message import set_bcr, set_phase_a_mmxu
openfmbsim/devices/message.py:16: in
import commonmodule_pb2 as cm
E ModuleNotFoundError: No module named 'commonmodule_pb2'
_________ ERROR collecting tests/devices/test_single_phase_recloser.py _________
ImportError while importing test module '/app/tests/devices/test_single_phase_recloser.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/devices/test_single_phase_recloser.py:17: in
from openfmbsim.devices.single_phase_recloser import SinglePhaseRecloser
openfmbsim/devices/single_phase_recloser.py:18: in
from .message import set_phase_a_mmxu
openfmbsim/devices/message.py:16: in
import commonmodule_pb2 as cm
E ModuleNotFoundError: No module named 'commonmodule_pb2'
__________ ERROR collecting tests/devices/test_single_phase_solar.py ___________
ImportError while importing test module '/app/tests/devices/test_single_phase_solar.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/devices/test_single_phase_solar.py:17: in
from openfmbsim.devices.single_phase_solar import SinglePhaseSolar
openfmbsim/devices/single_phase_solar.py:18: in
from .message import set_phase_a_mmxu
openfmbsim/devices/message.py:16: in
import commonmodule_pb2 as cm
E ModuleNotFoundError: No module named 'commonmodule_pb2'
=========================== short test summary info ============================
ERROR tests/test_nats_server.py
ERROR tests/test_server.py
ERROR tests/test_simulated_device.py
ERROR tests/test_simulated_system.py
ERROR tests/test_web_server.py
ERROR tests/devices/test_single_phase_breaker.py
ERROR tests/devices/test_single_phase_generator.py
ERROR tests/devices/test_single_phase_meter.py
ERROR tests/devices/test_single_phase_recloser.py
ERROR tests/devices/test_single_phase_solar.py
!!!!!!!!!!!!!!!!!!! Interrupted: 10 errors during collection !!!!!!!!!!!!!!!!!!!
============================== 10 errors in 1.59s ==============================
The command '/bin/sh -c echo "Installing required Python dependencies" && pip install -r requirements-dev.txt && echo "Running tests in the container environment" && pytest tests && echo "Cleaning up tests from the container environment" && rm -r /app/tests' returned a non-zero code: 2
ERROR: Service 'simulator' failed to build : Build failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions