Error when running pytest -m connection

when I tried to run pytest -m connection, i got errors :

============================= test session starts ==============================
platform linux – Python 3.6.3, pytest-5.3.1, py-1.8.0, pluggy-0.13.1
rootdir: /home/supriadi/projects/mflix-python/tests
plugins: flask-0.10.0
collected 43 items / 39 deselected / 4 selected

test_db_connection.py EEEE [100%]

==================================== ERRORS ====================================
______________________ ERROR at setup of test_atlas_setup ______________________

request = <SubRequest ‘_configure_application’ for >
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fcfa952d4a8>

@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
    """Use `pytest.mark.options` decorator to pass options to your application
    factory::

        @pytest.mark.options(debug=False)
        def test_something(app):
            assert not app.debug, 'the application works not in debug mode!'

    """
    if 'app' not in request.fixturenames:
        return
  app = request.getfuncargvalue('app')

E AttributeError: ‘SubRequest’ object has no attribute ‘getfuncargvalue’

…/mflix_venv/lib64/python3.6/site-packages/pytest_flask/plugin.py:109: AttributeError
_____________________ ERROR at setup of test_basic_movies ______________________

request = <SubRequest ‘_configure_application’ for >
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fcfa9511518>

@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
    """Use `pytest.mark.options` decorator to pass options to your application
    factory::

        @pytest.mark.options(debug=False)
        def test_something(app):
            assert not app.debug, 'the application works not in debug mode!'

    """
    if 'app' not in request.fixturenames:
        return
  app = request.getfuncargvalue('app')

E AttributeError: ‘SubRequest’ object has no attribute ‘getfuncargvalue’

…/mflix_venv/lib64/python3.6/site-packages/pytest_flask/plugin.py:109: AttributeError
__________________ ERROR at setup of test_search_by_movie_id ___________________

request = <SubRequest ‘_configure_application’ for >
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fcfa952db38>

@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
    """Use `pytest.mark.options` decorator to pass options to your application
    factory::

        @pytest.mark.options(debug=False)
        def test_something(app):
            assert not app.debug, 'the application works not in debug mode!'

    """
    if 'app' not in request.fixturenames:
        return
  app = request.getfuncargvalue('app')

E AttributeError: ‘SubRequest’ object has no attribute ‘getfuncargvalue’

…/mflix_venv/lib64/python3.6/site-packages/pytest_flask/plugin.py:109: AttributeError
__________________ ERROR at setup of test_simple_text_search ___________________

request = <SubRequest ‘_configure_application’ for >
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fcfa9511908>

@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
    """Use `pytest.mark.options` decorator to pass options to your application
    factory::

        @pytest.mark.options(debug=False)
        def test_something(app):
            assert not app.debug, 'the application works not in debug mode!'

    """
    if 'app' not in request.fixturenames:
        return
  app = request.getfuncargvalue('app')

E AttributeError: ‘SubRequest’ object has no attribute ‘getfuncargvalue’

…/mflix_venv/lib64/python3.6/site-packages/pytest_flask/plugin.py:109: AttributeError

I need advice regarding these errors. Thank you.

Please share the output of pip install -r requirements.txt.

Kanika

hi kanika,

thank you for your response.
Here are the output :

Collecting Flask==0.12.4
Using cached https://files.pythonhosted.org/packages/2e/48/f1936dadac2326b3d73f2fe0a964a87d16be16eb9d7fc56f09c1bea3d17c/Flask-0.12.4-py2.py3-none-any.whl
Processing /home/supriadi/.cache/pip/wheels/39/14/f8/3be6cc331373428d6864911554a2a3d9af0e84acd4caa401d9/Flask_Bcrypt-0.7.1-cp36-none-any.whl
Collecting Flask-Login==0.4.0
Using cached https://files.pythonhosted.org/packages/5a/14/364597ec0dd5490eb4443adae60b35088a6b7d466a9f7c8dacbe259477b5/Flask_Login-0.4.0-py2.py3-none-any.whl
Collecting pymongo==3.7.2
Using cached https://files.pythonhosted.org/packages/b1/45/5440555b901a8416196fbf2499c4678ef74de8080c007104107a8cfdda20/pymongo-3.7.2-cp36-cp36m-manylinux1_x86_64.whl
Collecting dnspython==1.15.0
Using cached https://files.pythonhosted.org/packages/a6/72/209e18bdfedfd78c6994e9ec96981624a5ad7738524dd474237268422cb8/dnspython-1.15.0-py2.py3-none-any.whl
Collecting pytest==5.2.0
Using cached https://files.pythonhosted.org/packages/9a/46/903ea822d83187bb8b354fcb3d085fb10b7787be39f9cf1628bc6ef8f9c9/pytest-5.2.0-py3-none-any.whl
Collecting pytest-flask==0.10.0
Using cached https://files.pythonhosted.org/packages/30/39/cfff2ef18c97f50024ee4bcb8a1ab5ec7dabdb2c2edc5b2cc93e8f867481/pytest_flask-0.10.0-py2.py3-none-any.whl
Collecting Flask-Cors==3.0.3
Using cached https://files.pythonhosted.org/packages/83/a7/c7243ffd096a491013956c9ee71e2ed0b7d14979fafe89986ca2d30fc6f7/Flask_Cors-3.0.3-py2.py3-none-any.whl
Processing /home/supriadi/.cache/pip/wheels/30/00/61/27e769527d4c2ad85822ea51bb23d9334e1dcfaaa55704dc5b/Flask_JWT_Extended-3.7.0-py2.py3-none-any.whl
Collecting faker==0.8.13
Using cached https://files.pythonhosted.org/packages/25/96/70d8293a839b21133dcb11bb15aec0ed9d2aca9da6a9766a5e21c848615b/Faker-0.8.13-py2.py3-none-any.whl
Collecting jupyter==1.0.0
Using cached https://files.pythonhosted.org/packages/83/df/0f5dd132200728a86190397e1ea87cd76244e42d39ec5e88efd25b2abd7e/jupyter-1.0.0-py2.py3-none-any.whl
Collecting jupyter-client==5.3.4
Using cached https://files.pythonhosted.org/packages/13/81/fe0eee1bcf949851a120254b1f530ae1e01bdde2d3ab9710c6ff81525061/jupyter_client-5.3.4-py2.py3-none-any.whl
Collecting jupyter-console==6.0.0
Using cached https://files.pythonhosted.org/packages/cb/ee/6374ae8c21b7d0847f9c3722dcdfac986b8e54fa9ad9ea66e1eb6320d2b8/jupyter_console-6.0.0-py2.py3-none-any.whl
Collecting jupyter-core==4.6.0
Using cached https://files.pythonhosted.org/packages/56/a6/fe4b7029d4994870df6685bdc7bae5417bea30b627c4ce36106f9cac31fc/jupyter_core-4.6.0-py2.py3-none-any.whl
Collecting Werkzeug>=0.7
Using cached https://files.pythonhosted.org/packages/ce/42/3aeda98f96e85fd26180534d36570e4d18108d62ae36f87694b476b83d6f/Werkzeug-0.16.0-py2.py3-none-any.whl
Collecting itsdangerous>=0.21
Using cached https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting Jinja2>=2.4
Using cached https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl
Collecting click>=2.0
Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting bcrypt
Using cached https://files.pythonhosted.org/packages/8b/1d/82826443777dd4a624e38a08957b975e75df859b381ae302cfd7a30783ed/bcrypt-3.1.7-cp34-abi3-manylinux1_x86_64.whl
Collecting atomicwrites>=1.0
Using cached https://files.pythonhosted.org/packages/52/90/6155aa926f43f2b2a22b01be7241be3bfd1ceaf7d0b3267213e8127d41f4/atomicwrites-1.3.0-py2.py3-none-any.whl
Collecting more-itertools>=4.0.0
Using cached https://files.pythonhosted.org/packages/68/03/0604cec1ea13c9f063dd50f900d1a36160334dd3cfb01fd0e638f61b46ba/more_itertools-8.0.2-py3-none-any.whl
Collecting importlib-metadata>=0.12; python_version < “3.8”
Using cached https://files.pythonhosted.org/packages/e9/71/1a1e0ed0981bb6a67bce55a210f168126b7ebd2065958673797ea66489ca/importlib_metadata-1.3.0-py2.py3-none-any.whl
Collecting packaging
Using cached https://files.pythonhosted.org/packages/cf/94/9672c2d4b126e74c4496c6b3c58a8b51d6419267be9e70660ba23374c875/packaging-19.2-py2.py3-none-any.whl
Collecting pluggy<1.0,>=0.12
Using cached https://files.pythonhosted.org/packages/a0/28/85c7aa31b80d150b772fbe4a229487bc6644da9ccb7e427dd8cc60cb8a62/pluggy-0.13.1-py2.py3-none-any.whl
Collecting attrs>=17.4.0
Using cached https://files.pythonhosted.org/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl
Collecting py>=1.5.0
Using cached https://files.pythonhosted.org/packages/76/bc/394ad449851729244a97857ee14d7cba61ddb268dce3db538ba2f2ba1f0f/py-1.8.0-py2.py3-none-any.whl
Collecting wcwidth
Using cached https://files.pythonhosted.org/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/wcwidth-0.1.7-py2.py3-none-any.whl
Collecting Six
Using cached https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Collecting PyJWT
Using cached https://files.pythonhosted.org/packages/87/8b/6a9f14b5f781697e51259d81657e6048fd31a113229cf346880bb7545565/PyJWT-1.7.1-py2.py3-none-any.whl
Collecting text-unidecode==1.2
Using cached https://files.pythonhosted.org/packages/79/42/d717cc2b4520fb09e45b344b1b0b4e81aa672001dd128c180fabc655c341/text_unidecode-1.2-py2.py3-none-any.whl
Collecting python-dateutil>=2.4
Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
Collecting ipywidgets
Using cached https://files.pythonhosted.org/packages/56/a0/dbcf5881bb2f51e8db678211907f16ea0a182b232c591a6d6f276985ca95/ipywidgets-7.5.1-py2.py3-none-any.whl
Collecting qtconsole
Using cached https://files.pythonhosted.org/packages/7c/57/3528b84ffa753e2089908bbf74bb5ae60653eb7a63797b6234e88b847d67/qtconsole-4.6.0-py2.py3-none-any.whl
Collecting ipykernel
Using cached https://files.pythonhosted.org/packages/e1/92/8fec943b5b81078399f969f00557804d884c96fcd0bc296e81a2ed4fd270/ipykernel-5.1.3-py3-none-any.whl
Collecting notebook
Using cached https://files.pythonhosted.org/packages/f5/69/d2ffaf7efc20ce47469187e3a41e6e03e17b45de5a6559f4e7ab3eace5e1/notebook-6.0.2-py3-none-any.whl
Collecting nbconvert
Using cached https://files.pythonhosted.org/packages/79/6c/05a569e9f703d18aacb89b7ad6075b404e8a4afde2c26b73ca77bb644b14/nbconvert-5.6.1-py2.py3-none-any.whl
Collecting traitlets
Using cached https://files.pythonhosted.org/packages/ca/ab/872a23e29cec3cf2594af7e857f18b687ad21039c1f9b922fac5b9b142d5/traitlets-4.3.3-py2.py3-none-any.whl
Collecting pyzmq>=13
Using cached https://files.pythonhosted.org/packages/94/07/cee3d328a2e13f9de1c2b62cced7a389b61ac81424f2e377f3dc9d668282/pyzmq-18.1.1-cp36-cp36m-manylinux1_x86_64.whl
Processing /home/supriadi/.cache/pip/wheels/84/bf/40/2f6ef700f48401ca40e5e3dd7d0e3c0a90e064897b7fe5fc08/tornado-6.0.3-cp36-cp36m-linux_x86_64.whl
Collecting ipython
Using cached https://files.pythonhosted.org/packages/00/17/c3e3dd337cc601b47c599441786fd4e888b587a2a512d38ac752274fd0bc/ipython-7.10.1-py3-none-any.whl
Collecting pygments
Using cached https://files.pythonhosted.org/packages/be/39/32da3184734730c0e4d3fa3b2b5872104668ad6dc1b5a73d8e477e5fe967/Pygments-2.5.2-py2.py3-none-any.whl
Collecting prompt-toolkit<2.1.0,>=2.0.0
Using cached https://files.pythonhosted.org/packages/87/61/2dfea88583d5454e3a64f9308a686071d58d59a55db638268a6413e1eb6d/prompt_toolkit-2.0.10-py3-none-any.whl
Collecting MarkupSafe>=0.23
Using cached https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting cffi>=1.1
Using cached https://files.pythonhosted.org/packages/49/72/0d42f94fe94afa8030350c26e9d787219f3f008ec9bf6b86c66532b29236/cffi-1.13.2-cp36-cp36m-manylinux1_x86_64.whl
Collecting zipp>=0.5
Using cached https://files.pythonhosted.org/packages/74/3d/1ee25a26411ba0401b43c6376d2316a71addcc72ef8690b101b4ea56d76a/zipp-0.6.0-py2.py3-none-any.whl
Collecting pyparsing>=2.0.2
Using cached https://files.pythonhosted.org/packages/c0/0c/fc2e007d9a992d997f04a80125b0f183da7fb554f1de701bbb70a8e7d479/pyparsing-2.4.5-py2.py3-none-any.whl
Collecting widgetsnbextension~=3.5.0
Using cached https://files.pythonhosted.org/packages/6c/7b/7ac231c20d2d33c445eaacf8a433f4e22c60677eb9776c7c5262d7ddee2d/widgetsnbextension-3.5.1-py2.py3-none-any.whl
Collecting nbformat>=4.2.0
Using cached https://files.pythonhosted.org/packages/da/27/9a654d2b6cc1eaa517d1c5a4405166c7f6d72f04f6e7eea41855fe808a46/nbformat-4.4.0-py2.py3-none-any.whl
Collecting ipython-genutils
Using cached https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whl
Processing /home/supriadi/.cache/pip/wheels/1c/54/34/fd47cd9b308826cc4292b54449c1899a30251ef3b506bc91ea/prometheus_client-0.7.1-cp36-none-any.whl
Collecting terminado>=0.8.1
Using cached https://files.pythonhosted.org/packages/ff/96/1d9a2c23990aea8f8e0b5c3b6627d03196a73771a17a2d9860bbe9823ab6/terminado-0.8.3-py2.py3-none-any.whl
Collecting Send2Trash
Using cached https://files.pythonhosted.org/packages/49/46/c3dc27481d1cc57b9385aff41c474ceb7714f7935b1247194adae45db714/Send2Trash-1.5.0-py3-none-any.whl
Processing /home/supriadi/.cache/pip/wheels/39/01/56/f1b08a6275acc59e846fa4c1e1b65dbc1919f20157d9e66c20/pandocfilters-1.4.2-cp36-none-any.whl
Collecting defusedxml
Using cached https://files.pythonhosted.org/packages/06/74/9b387472866358ebc08732de3da6dc48e44b0aacd2ddaa5cb85ab7e986a2/defusedxml-0.6.0-py2.py3-none-any.whl
Collecting testpath
Using cached https://files.pythonhosted.org/packages/1b/9e/1a170feaa54f22aeb5a5d16c9015e82234275a3c8ab630b552493f9cb8a9/testpath-0.4.4-py2.py3-none-any.whl
Collecting entrypoints>=0.2.2
Using cached https://files.pythonhosted.org/packages/ac/c6/44694103f8c221443ee6b0041f69e2740d89a25641e62fb4f2ee568f2f9c/entrypoints-0.3-py2.py3-none-any.whl
Collecting bleach
Using cached https://files.pythonhosted.org/packages/ab/05/27e1466475e816d3001efb6e0a85a819be17411420494a1e602c36f8299d/bleach-3.1.0-py2.py3-none-any.whl
Collecting mistune<2,>=0.8.1
Using cached https://files.pythonhosted.org/packages/09/ec/4b43dae793655b7d8a25f76119624350b4d65eb663459eb9603d7f1f0345/mistune-0.8.4-py2.py3-none-any.whl
Collecting decorator
Using cached https://files.pythonhosted.org/packages/8f/b7/f329cfdc75f3d28d12c65980e4469e2fa373f1953f5df6e370e84ea2e875/decorator-4.4.1-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in ./mflix_venv2/lib/python3.6/site-packages (from ipython->jupyter-console==6.0.0->-r requirements.txt (line 13)) (42.0.2)
Collecting pickleshare
Using cached https://files.pythonhosted.org/packages/9a/41/220f49aaea88bc6fa6cba8d05ecf24676326156c23b991e80b3f2fc24c77/pickleshare-0.7.5-py2.py3-none-any.whl
Collecting pexpect; sys_platform != “win32”
Using cached https://files.pythonhosted.org/packages/0e/3e/377007e3f36ec42f1b84ec322ee12141a9e10d808312e5738f52f80a232c/pexpect-4.7.0-py2.py3-none-any.whl
Collecting jedi>=0.10
Using cached https://files.pythonhosted.org/packages/55/54/da994f359e4e7da4776a200e76dbc85ba5fc319eefc22e33d55296d95a1d/jedi-0.15.1-py2.py3-none-any.whl
Processing /home/supriadi/.cache/pip/wheels/98/b0/dd/29e28ff615af3dda4c67cab719dd51357597eabff926976b45/backcall-0.1.0-cp36-none-any.whl
Processing /home/supriadi/.cache/pip/wheels/f2/9a/90/de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511/pycparser-2.19-py2.py3-none-any.whl
Collecting jsonschema!=2.5.0,>=2.4
Using cached https://files.pythonhosted.org/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl
Collecting ptyprocess; os_name != “nt”
Using cached https://files.pythonhosted.org/packages/d1/29/605c2cc68a9992d18dada28206eeada56ea4bd07a239669da41674648b6f/ptyprocess-0.6.0-py2.py3-none-any.whl
Collecting webencodings
Using cached https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl
Collecting parso>=0.5.0
Using cached https://files.pythonhosted.org/packages/a3/bd/bf4e5bd01d79906e5b945a7af033154da49fd2b0d5b5c705a21330323305/parso-0.5.1-py2.py3-none-any.whl
Processing /home/supriadi/.cache/pip/wheels/83/89/d3/1712b9c33c9b9c0911b188a86aeff2a9a05e113f986cf79d92/pyrsistent-0.15.6-cp36-cp36m-linux_x86_64.whl
Installing collected packages: Werkzeug, itsdangerous, MarkupSafe, Jinja2, click, Flask, pycparser, cffi, Six, bcrypt, Flask-Bcrypt, Flask-Login, pymongo, dnspython, atomicwrites, more-itertools, zipp, importlib-metadata, pyparsing, packaging, pluggy, attrs, py, wcwidth, pytest, pytest-flask, Flask-Cors, PyJWT, flask-jwt-extended, text-unidecode, python-dateutil, faker, prometheus-client, pyrsistent, jsonschema, decorator, ipython-genutils, traitlets, jupyter-core, nbformat, pandocfilters, defusedxml, testpath, entrypoints, webencodings, bleach, mistune, pygments, nbconvert, pyzmq, tornado, jupyter-client, pickleshare, ptyprocess, pexpect, parso, jedi, backcall, prompt-toolkit, ipython, ipykernel, terminado, Send2Trash, notebook, widgetsnbextension, ipywidgets, qtconsole, jupyter-console, jupyter
Successfully installed Flask-0.12.4 Flask-Bcrypt-0.7.1 Flask-Cors-3.0.3 Flask-Login-0.4.0 Jinja2-2.10.3 MarkupSafe-1.1.1 PyJWT-1.7.1 Send2Trash-1.5.0 Six-1.13.0 Werkzeug-0.16.0 atomicwrites-1.3.0 attrs-19.3.0 backcall-0.1.0 bcrypt-3.1.7 bleach-3.1.0 cffi-1.13.2 click-7.0 decorator-4.4.1 defusedxml-0.6.0 dnspython-1.15.0 entrypoints-0.3 faker-0.8.13 flask-jwt-extended-3.7.0 importlib-metadata-1.3.0 ipykernel-5.1.3 ipython-7.10.1 ipython-genutils-0.2.0 ipywidgets-7.5.1 itsdangerous-1.1.0 jedi-0.15.1 jsonschema-3.2.0 jupyter-1.0.0 jupyter-client-5.3.4 jupyter-console-6.0.0 jupyter-core-4.6.0 mistune-0.8.4 more-itertools-8.0.2 nbconvert-5.6.1 nbformat-4.4.0 notebook-6.0.2 packaging-19.2 pandocfilters-1.4.2 parso-0.5.1 pexpect-4.7.0 pickleshare-0.7.5 pluggy-0.13.1 prometheus-client-0.7.1 prompt-toolkit-2.0.10 ptyprocess-0.6.0 py-1.8.0 pycparser-2.19 pygments-2.5.2 pymongo-3.7.2 pyparsing-2.4.5 pyrsistent-0.15.6 pytest-5.2.0 pytest-flask-0.10.0 python-dateutil-2.8.1 pyzmq-18.1.1 qtconsole-4.6.0 terminado-0.8.3 testpath-0.4.4 text-unidecode-1.2 tornado-6.0.3 traitlets-4.3.3 wcwidth-0.1.7 webencodings-0.5.1 widgetsnbextension-3.5.1 zipp-0.6.0

And are you able to run the mflix application by running “python run.py” ?

Is yes, make sure the anaconda environment or virtual env is active when you are running pytest.

Kanika

I modify requirements.txt :

Flask
Flask-Bcrypt
Flask-Login
pymongo
dnspython
pytest
pytest-flask
Flask-Cors
flask-jwt-extended
faker
jupyter
jupyter-client
jupyter-console
jupyter-core

then I run : pip install -r requirements.txt

my problem solved

I am happy that your problem has been resolved. :slight_smile:
It would be great if you can share what you changed in the file.

Kanika

I am getting the same issue - what exactly did you modify for each of the entries? You just list the entries but not their values.

This is not resolved - if there’s an issue with package versioning - we really need the up-to-date packages by requirements for us to make this work. Can we have the actual resolution of the entries he lists above? I have the same issue. TY.

Hi @Theodore_Boosalis_29501,

Thanks for sharing the feedback. We try our best to keep our code and files updated. But as you mentioned the information shared before was not enough to confirm what resolved the issue.

It would be great if you can help while debugging this. Few things before we move forward:

  • Have you already installed the requirements by running: pip install -r requirements.txt
  • Are you able to run the application using python run.py
  • Is the conda/virtualenv environment activated while you are running both the commands?

Kanika

Yes on all questions. Should I just forward version for each lib that’s failing?

Can you share the output of pip install -r requirements.txt? That would show everything.

That means you are able to view the movies on mflix UI application, right?

Kanika

I’ll do that this evening. At work now. Ty for sticking with this.

Here you go.

Yes I can view the movies on the UI when I execute run.py

Mail](https://go.microsoft.com/fwlink/?LinkId=550986) for Windows 10

(Attachment requirements.txt is missing)

(Attachment requirementsoutput.txt is missing)

(base) PS C:\Users\tedbo> cd “D:\Program Files\mflix-python”

(base) PS D:\Program Files\mflix-python> pip install -r requirements.txt

Requirement already satisfied: Flask==0.12.4 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 1)) (0.12.4)

Requirement already satisfied: Flask-Bcrypt==0.7.1 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 2)) (0.7.1)

Requirement already satisfied: Flask-Login==0.4.0 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 3)) (0.4.0)

Requirement already satisfied: pymongo==3.7.2 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 4)) (3.7.2)

Requirement already satisfied: dnspython==1.15.0 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 5)) (1.15.0)

Requirement already satisfied: pytest==5.3.2 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 6)) (5.3.2)

Requirement already satisfied: pytest-flask==0.10.0 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 7)) (0.10.0)

Requirement already satisfied: Flask-Cors==3.0.3 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 8)) (3.0.3)

Requirement already satisfied: flask-jwt-extended==3.7.0 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 9)) (3.7.0)

Requirement already satisfied: faker==0.8.13 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 10)) (0.8.13)

Requirement already satisfied: jupyter==1.0.0 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 11)) (1.0.0)

Requirement already satisfied: jupyter-client==5.2.4 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 12)) (5.2.4)

Requirement already satisfied: jupyter-console==6.0.0 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 13)) (6.0.0)

Requirement already satisfied: jupyter-core==4.4.0 in c:\programdata\anaconda3\lib\site-packages (from -r requirements.txt (line 14)) (4.4.0)

Requirement already satisfied: itsdangerous>=0.21 in c:\programdata\anaconda3\lib\site-packages (from Flask==0.12.4->-r requirements.txt (line 1)) (1.1.0)

Requirement already satisfied: click>=2.0 in c:\programdata\anaconda3\lib\site-packages (from Flask==0.12.4->-r requirements.txt (line 1)) (7.0)

Requirement already satisfied: Jinja2>=2.4 in c:\programdata\anaconda3\lib\site-packages (from Flask==0.12.4->-r requirements.txt (line 1)) (2.10.3)

Requirement already satisfied: Werkzeug>=0.7 in c:\programdata\anaconda3\lib\site-packages (from Flask==0.12.4->-r requirements.txt (line 1)) (0.16.0)

Requirement already satisfied: bcrypt in c:\programdata\anaconda3\lib\site-packages (from Flask-Bcrypt==0.7.1->-r requirements.txt (line 2)) (3.1.7)

Requirement already satisfied: importlib-metadata>=0.12; python_version < “3.8” in c:\programdata\anaconda3\lib\site-packages (from pytest==5.3.2->-r requirements.txt (line 6)) (1.3.0)

Requirement already satisfied: wcwidth in c:\programdata\anaconda3\lib\site-packages (from pytest==5.3.2->-r requirements.txt (line 6)) (0.1.7)

Requirement already satisfied: colorama; sys_platform == “win32” in c:\programdata\anaconda3\lib\site-packages (from pytest==5.3.2->-r requirements.txt (line 6)) (0.4.3)

Requirement already satisfied: packaging in c:\programdata\anaconda3\lib\site-packages (from pytest==5.3.2->-r requirements.txt (line 6)) (19.2)

Requirement already satisfied: py>=1.5.0 in c:\programdata\anaconda3\lib\site-packages (from pytest==5.3.2->-r requirements.txt (line 6)) (1.8.0)

Requirement already satisfied: atomicwrites>=1.0; sys_platform == “win32” in c:\programdata\anaconda3\lib\site-packages (from pytest==5.3.2->-r requirements.txt (line 6)) (1.3.0)

Requirement already satisfied: more-itertools>=4.0.0 in c:\programdata\anaconda3\lib\site-packages (from pytest==5.3.2->-r requirements.txt (line 6)) (8.0.2)

Requirement already satisfied: attrs>=17.4.0 in c:\programdata\anaconda3\lib\site-packages (from pytest==5.3.2->-r requirements.txt (line 6)) (19.3.0)

Requirement already satisfied: pluggy<1.0,>=0.12 in c:\programdata\anaconda3\lib\site-packages (from pytest==5.3.2->-r requirements.txt (line 6)) (0.13.1)

Requirement already satisfied: Six in c:\programdata\anaconda3\lib\site-packages (from Flask-Cors==3.0.3->-r requirements.txt (line 8)) (1.13.0)

Requirement already satisfied: PyJWT in c:\programdata\anaconda3\lib\site-packages (from flask-jwt-extended==3.7.0->-r requirements.txt (line 9)) (1.7.1)

Requirement already satisfied: python-dateutil>=2.4 in c:\programdata\anaconda3\lib\site-packages (from faker==0.8.13->-r requirements.txt (line 10)) (2.8.1)

Requirement already satisfied: text-unidecode==1.2 in c:\programdata\anaconda3\lib\site-packages (from faker==0.8.13->-r requirements.txt (line 10)) (1.2)

Requirement already satisfied: ipykernel in c:\programdata\anaconda3\lib\site-packages (from jupyter==1.0.0->-r requirements.txt (line 11)) (5.1.3)

Requirement already satisfied: nbconvert in c:\programdata\anaconda3\lib\site-packages (from jupyter==1.0.0->-r requirements.txt (line 11)) (5.6.1)

Requirement already satisfied: qtconsole in c:\programdata\anaconda3\lib\site-packages (from jupyter==1.0.0->-r requirements.txt (line 11)) (4.6.0)

Requirement already satisfied: ipywidgets in c:\programdata\anaconda3\lib\site-packages (from jupyter==1.0.0->-r requirements.txt (line 11)) (7.5.1)

Requirement already satisfied: notebook in c:\programdata\anaconda3\lib\site-packages (from jupyter==1.0.0->-r requirements.txt (line 11)) (6.0.2)

Requirement already satisfied: traitlets in c:\programdata\anaconda3\lib\site-packages (from jupyter-client==5.2.4->-r requirements.txt (line 12)) (4.3.3)

Requirement already satisfied: pyzmq>=13 in c:\programdata\anaconda3\lib\site-packages (from jupyter-client==5.2.4->-r requirements.txt (line 12)) (18.1.0)

Requirement already satisfied: tornado>=4.1 in c:\programdata\anaconda3\lib\site-packages (from jupyter-client==5.2.4->-r requirements.txt (line 12)) (6.0.3)

Requirement already satisfied: ipython in c:\programdata\anaconda3\lib\site-packages (from jupyter-console==6.0.0->-r requirements.txt (line 13)) (7.10.2)

Requirement already satisfied: prompt_toolkit<2.1.0,>=2.0.0 in c:\programdata\anaconda3\lib\site-packages (from jupyter-console==6.0.0->-r requirements.txt (line 13)) (2.0.9)

Requirement already satisfied: pygments in c:\programdata\anaconda3\lib\site-packages (from jupyter-console==6.0.0->-r requirements.txt (line 13)) (2.5.2)

Requirement already satisfied: MarkupSafe>=0.23 in c:\programdata\anaconda3\lib\site-packages (from Jinja2>=2.4->Flask==0.12.4->-r requirements.txt (line 1)) (1.1.1)

Requirement already satisfied: cffi>=1.1 in c:\programdata\anaconda3\lib\site-packages (from bcrypt->Flask-Bcrypt==0.7.1->-r requirements.txt (line 2)) (1.13.2)

Requirement already satisfied: zipp>=0.5 in c:\programdata\anaconda3\lib\site-packages (from importlib-metadata>=0.12; python_version < “3.8”->pytest==5.3.2->-r requirements.txt (line 6)) (0.6.0)

Requirement already satisfied: pyparsing>=2.0.2 in c:\programdata\anaconda3\lib\site-packages (from packaging->pytest==5.3.2->-r requirements.txt (line 6)) (2.4.5)

Requirement already satisfied: entrypoints>=0.2.2 in c:\programdata\anaconda3\lib\site-packages (from nbconvert->jupyter==1.0.0->-r requirements.txt (line 11)) (0.3)

Requirement already satisfied: nbformat>=4.4 in c:\programdata\anaconda3\lib\site-packages (from nbconvert->jupyter==1.0.0->-r requirements.txt (line 11)) (4.4.0)

Requirement already satisfied: testpath in c:\programdata\anaconda3\lib\site-packages (from nbconvert->jupyter==1.0.0->-r requirements.txt (line 11)) (0.4.4)

Requirement already satisfied: mistune<2,>=0.8.1 in c:\programdata\anaconda3\lib\site-packages (from nbconvert->jupyter==1.0.0->-r requirements.txt (line 11)) (0.8.4)

Requirement already satisfied: bleach in c:\programdata\anaconda3\lib\site-packages (from nbconvert->jupyter==1.0.0->-r requirements.txt (line 11)) (3.1.0)

Requirement already satisfied: pandocfilters>=1.4.1 in c:\programdata\anaconda3\lib\site-packages (from nbconvert->jupyter==1.0.0->-r requirements.txt (line 11)) (1.4.2)

Requirement already satisfied: defusedxml in c:\programdata\anaconda3\lib\site-packages (from nbconvert->jupyter==1.0.0->-r requirements.txt (line 11)) (0.6.0)

Requirement already satisfied: ipython-genutils in c:\programdata\anaconda3\lib\site-packages (from qtconsole->jupyter==1.0.0->-r requirements.txt (line 11)) (0.2.0)

Requirement already satisfied: widgetsnbextension~=3.5.0 in c:\programdata\anaconda3\lib\site-packages (from ipywidgets->jupyter==1.0.0->-r requirements.txt (line 11)) (3.5.1)

Requirement already satisfied: Send2Trash in c:\programdata\anaconda3\lib\site-packages (from notebook->jupyter==1.0.0->-r requirements.txt (line 11)) (1.5.0)

Requirement already satisfied: terminado>=0.8.1 in c:\programdata\anaconda3\lib\site-packages (from notebook->jupyter==1.0.0->-r requirements.txt (line 11)) (0.8.3)

Requirement already satisfied: prometheus-client in c:\programdata\anaconda3\lib\site-packages (from notebook->jupyter==1.0.0->-r requirements.txt (line 11)) (0.7.1)

Requirement already satisfied: decorator in c:\programdata\anaconda3\lib\site-packages (from traitlets->jupyter-client==5.2.4->-r requirements.txt (line 12)) (4.4.1)

Requirement already satisfied: backcall in c:\programdata\anaconda3\lib\site-packages (from ipython->jupyter-console==6.0.0->-r requirements.txt (line 13)) (0.1.0)

Requirement already satisfied: pickleshare in c:\programdata\anaconda3\lib\site-packages (from ipython->jupyter-console==6.0.0->-r requirements.txt (line 13)) (0.7.5)

Requirement already satisfied: setuptools>=18.5 in c:\programdata\anaconda3\lib\site-packages (from ipython->jupyter-console==6.0.0->-r requirements.txt (line 13)) (42.0.2.post20191203)

Requirement already satisfied: jedi>=0.10 in c:\programdata\anaconda3\lib\site-packages (from ipython->jupyter-console==6.0.0->-r requirements.txt (line 13)) (0.14.1)

Requirement already satisfied: pycparser in c:\programdata\anaconda3\lib\site-packages (from cffi>=1.1->bcrypt->Flask-Bcrypt==0.7.1->-r requirements.txt (line 2)) (2.19)

Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in c:\programdata\anaconda3\lib\site-packages (from nbformat>=4.4->nbconvert->jupyter==1.0.0->-r requirements.txt (line 11)) (3.2.0)

Requirement already satisfied: webencodings in c:\programdata\anaconda3\lib\site-packages (from bleach->nbconvert->jupyter==1.0.0->-r requirements.txt (line 11)) (0.5.1)

Requirement already satisfied: parso>=0.5.0 in c:\programdata\anaconda3\lib\site-packages (from jedi>=0.10->ipython->jupyter-console==6.0.0->-r requirements.txt (line 13)) (0.5.2)

Requirement already satisfied: pyrsistent>=0.14.0 in c:\programdata\anaconda3\lib\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.4->nbconvert->jupyter==1.0.0->-r requirements.txt (line 11)) (0.15.6)

(base) PS D:\Program Files\mflix-python>

Mail](https://go.microsoft.com/fwlink/?LinkId=550986) for Windows 10

Where are we with this?

Time is ticking.

Mail](https://go.microsoft.com/fwlink/?LinkId=550986) for Windows 10

Hi @Theodore_Boosalis_29501,

Can you try running the pytest again after running the below command:

    pip install attrs==19.1.0

Kanika

I will run it tonight. I finished course using workarounds. But I want to see if this solves it.

Here’s the response after I installed attr

(base) PS C:\Users\tedbo> pip install attrs==19.1.0

Collecting attrs==19.1.0

Using cached https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl

ERROR: hypothesis 4.54.2 has requirement attrs>=19.2.0, but you’ll have attrs 19.1.0 which is incompatible.

Installing collected packages: attrs

Found existing installation: attrs 19.3.0

Uninstalling attrs-19.3.0:

Successfully uninstalled attrs-19.3.0

Successfully installed attrs-19.1.0

(base) PS D:\Program Files\mflix-python> activate mflix

(base) PS D:\Program Files\mflix-python> pytest -m connection

Traceback (most recent call last):

File “c:\programdata\anaconda3\lib\runpy.py”, line 193, in _run_module_as_main

main”, mod_spec)

File “c:\programdata\anaconda3\lib\runpy.py”, line 85, in _run_code

exec(code, run_globals)

File “C:\ProgramData\Anaconda3\Scripts\pytest.exe_main_.py”, line 7, in

File “c:\programdata\anaconda3\lib\site-packages_pytest\config_init_.py”, line 72, in main

config = _prepareconfig(args, plugins)

File “c:\programdata\anaconda3\lib\site-packages_pytest\config_init_.py”, line 223, in _prepareconfig

pluginmanager=pluginmanager, args=args

File “c:\programdata\anaconda3\lib\site-packages\pluggy\hooks.py”, line 286, in call

return self._hookexec(self, self.get_hookimpls(), kwargs)

File “c:\programdata\anaconda3\lib\site-packages\pluggy\manager.py”, line 93, in _hookexec

return self._inner_hookexec(hook, methods, kwargs)

File “c:\programdata\anaconda3\lib\site-packages\pluggy\manager.py”, line 87, in

firstresult=hook.spec.opts.get(“firstresult”) if hook.spec else False,

File “c:\programdata\anaconda3\lib\site-packages\pluggy\callers.py”, line 203, in _multicall

gen.send(outcome)

File “c:\programdata\anaconda3\lib\site-packages_pytest\helpconfig.py”, line 89, in pytest_cmdline_parse

config = outcome.get_result()

File “c:\programdata\anaconda3\lib\site-packages\pluggy\callers.py”, line 80, in get_result

raise ex[1].with_traceback(ex[2])

File “c:\programdata\anaconda3\lib\site-packages\pluggy\callers.py”, line 187, in _multicall

res = hook_impl.function(*args)

File “c:\programdata\anaconda3\lib\site-packages_pytest\config_init_.py”, line 793, in pytest_cmdline_parse

self.parse(args)

File “c:\programdata\anaconda3\lib\site-packages_pytest\config_init_.py”, line 999, in parse

self._preparse(args, addopts=addopts)

File “c:\programdata\anaconda3\lib\site-packages_pytest\config_init_.py”, line 947, in _preparse

self.pluginmanager.load_setuptools_entrypoints(“pytest11”)

File “c:\programdata\anaconda3\lib\site-packages\pluggy\manager.py”, line 299, in load_setuptools_entrypoints

plugin = ep.load()

File “c:\programdata\anaconda3\lib\site-packages\importlib_metadata_init_.py”, line 94, in load

module = import_module(match.group(‘module’))

File “c:\programdata\anaconda3\lib\importlib_init_.py”, line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File “”, line 1006, in _gcd_import

File “”, line 983, in _find_and_load

File “”, line 953, in _find_and_load_unlocked

File “”, line 219, in _call_with_frames_removed

File “”, line 1006, in _gcd_import

File “”, line 983, in _find_and_load

File “”, line 953, in _find_and_load_unlocked

File “”, line 219, in _call_with_frames_removed

File “”, line 1006, in _gcd_import

File “”, line 983, in _find_and_load

File “”, line 967, in _find_and_load_unlocked

File “”, line 677, in _load_unlocked

File “c:\programdata\anaconda3\lib\site-packages_pytest\assertion\rewrite.py”, line 143, in exec_module

exec(co, module.dict)

File “c:\programdata\anaconda3\lib\site-packages\hypothesis_init_.py”, line 36, in

from hypothesis.core import example, find, given, reproduce_failure, seed

File “”, line 983, in _find_and_load

File “”, line 967, in _find_and_load_unlocked

File “”, line 677, in _load_unlocked

File “c:\programdata\anaconda3\lib\site-packages_pytest\assertion\rewrite.py”, line 143, in exec_module

exec(co, module.dict)

File “c:\programdata\anaconda3\lib\site-packages\hypothesis\core.py”, line 73, in

from hypothesis.internal.conjecture.engine import ConjectureRunner, sort_key

File “”, line 983, in _find_and_load

File “”, line 967, in _find_and_load_unlocked

File “”, line 677, in _load_unlocked

File “c:\programdata\anaconda3\lib\site-packages_pytest\assertion\rewrite.py”, line 143, in exec_module

exec(co, module.dict)

File “c:\programdata\anaconda3\lib\site-packages\hypothesis\internal\conjecture\engine.py”, line 45, in

from hypothesis.internal.conjecture.shrinker import Shrinker, sort_key

File “”, line 983, in _find_and_load

File “”, line 967, in _find_and_load_unlocked

File “”, line 677, in _load_unlocked

File “c:\programdata\anaconda3\lib\site-packages_pytest\assertion\rewrite.py”, line 143, in exec_module

exec(co, module.dict)

File “c:\programdata\anaconda3\lib\site-packages\hypothesis\internal\conjecture\shrinker.py”, line 1444, in

@attr.s(slots=True, eq=False)

TypeError: attrs() got an unexpected keyword argument ‘eq’

Thanks, solved my problem

(mflix) D:\M220\mflix-python>pytest -m LAB_UNIT_TEST_NAME
============================= test session starts =============================
platform win32 – Python 3.7.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: D:\M220\mflix-python, inifile:
plugins: remotedata-0.3.2, openfiles-0.4.0, flask-0.10.0, doctestplus-0.4.0, arraydiff-0.3
collected 43 items