ERROR: lint: commands failed
syq23719034 opened this issue · 1 comments
rootdir: D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package, configfile: pyproject.toml
collected 2 items
tests/test_features.py::test_temporal_variable_transformer PASSED
tests/test_prediction.py::test_make_prediction PASSED
============================================================================================================ 2 passed in 0.47s =============================================================================================================
typechecks installed: appdirs==1.4.4,atomicwrites==1.4.0,attrs==21.4.0,black==20.8b1,click==8.1.3,colorama==0.4.4,feature-engine==1.0.2,flake8==3.9.2,iniconfig==1.1.1,isort==5.8.0,joblib==1.0.1,mccabe==0.6.1,mypy==0.812,mypy-extensions==0.4.3,numpy==1.20.3,packaging==21.3,pandas==1.3.5,pathspec==0.9.0,patsy==0.5.2,pluggy==1.0.0,py==1.11.0,pycodestyle==2.7.0,pydantic==1.8.2,pyflakes==2.3.1,pyparsing==3.0.8,pytest==6.2.5,python-dateutil==2.8.2,pytz==2022.1,regex==2022.4.24,ruamel.yaml==0.16.12,ruamel.yaml.clib==0.2.6,scikit-learn==1.0.2,scipy==1.8.0,six==1.16.0,statsmodels==0.13.2,strictyaml==1.3.2,threadpoolctl==3.1.0,toml==0.10.2,typed-ast==1.4.3,typing_extensions==4.2.0
typechecks run-test-pre: PYTHONHASHSEED='220'
typechecks run-test: commands[0] | mypy regression_model
Success: no issues found in 12 source files
stylechecks installed: appdirs==1.4.4,atomicwrites==1.4.0,attrs==21.4.0,black==20.8b1,click==8.1.3,colorama==0.4.4,feature-engine==1.0.2,flake8==3.9.2,iniconfig==1.1.1,isort==5.8.0,joblib==1.0.1,mccabe==0.6.1,mypy==0.812,mypy-extensions==0.4.3,numpy==1.20.3,packaging==21.3,pandas==1.3.5,pathspec==0.9.0,patsy==0.5.2,pluggy==1.0.0,py==1.11.0,pycodestyle==2.7.0,pydantic==1.8.2,pyflakes==2.3.1,pyparsing==3.0.8,pytest==6.2.5,python-dateutil==2.8.2,pytz==2022.1,regex==2022.4.24,ruamel.yaml==0.16.12,ruamel.yaml.clib==0.2.6,scikit-learn==1.0.2,scipy==1.8.0,six==1.16.0,statsmodels==0.13.2,strictyaml==1.3.2,threadpoolctl==3.1.0,toml==0.10.2,typed-ast==1.4.3,typing_extensions==4.2.0
stylechecks run-test-pre: PYTHONHASHSEED='220'
stylechecks run-test: commands[0] | flake8 regression_model tests
lint installed: appdirs==1.4.4,atomicwrites==1.4.0,attrs==21.4.0,black==20.8b1,click==8.1.3,colorama==0.4.4,feature-engine==1.0.2,flake8==3.9.2,iniconfig==1.1.1,isort==5.8.0,joblib==1.0.1,mccabe==0.6.1,mypy==0.812,mypy-extensions==0.4.3,numpy==1.20.3,packaging==21.3,pandas==1.3.5,pathspec==0.9.0,patsy==0.5.2,pluggy==1.0.0,py==1.11.0,pycodestyle==2.7.0,pydantic==1.8.2,pyflakes==2.3.1,pyparsing==3.0.8,pytest==6.2.5,python-dateutil==2.8.2,pytz==2022.1,regex==2022.4.24,ruamel.yaml==0.16.12,ruamel.yaml.clib==0.2.6,scikit-learn==1.0.2,scipy==1.8.0,six==1.16.0,statsmodels==0.13.2,strictyaml==1.3.2,threadpoolctl==3.1.0,toml==0.10.2,typed-ast==1.4.3,typing_extensions==4.2.0
lint run-test-pre: PYTHONHASHSEED='220'
lint run-test: commands[0] | isort regression_model tests
D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\isort\main.py:107: UserWarning: Unable to parse file regression_model\pipeline.py due to 'gbk' codec can't decode byte 0x99 in position 471: illegal multibyte sequence
warn(f"Unable to parse file {file_name} due to {error}")
D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\isort\main.py:107: UserWarning: Unable to parse file regression_model\predict.py due to 'gbk' codec can't decode byte 0x99 in position 471: illegal multibyte sequence
warn(f"Unable to parse file {file_name} due to {error}")
D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\isort\main.py:107: UserWarning: Unable to parse file regression_model_init_.py due to 'gbk' codec can't decode byte 0x99 in position 471: illegal multibyte sequence
warn(f"Unable to parse file {file_name} due to {error}")
D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\isort\main.py:107: UserWarning: Unable to parse file regression_model\processing\data_manager.py due to 'gbk' codec can't decode byte 0x99 in position 471: illegal multibyte sequence
warn(f"Unable to parse file {file_name} due to {error}")
D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\isort\main.py:107: UserWarning: Unable to parse file regression_model\processing\validation.py due to 'gbk' codec can't decode byte 0x99 in position 471: illegal multibyte sequence
warn(f"Unable to parse file {file_name} due to {error}")
D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\isort\main.py:107: UserWarning: Unable to parse file tests\conftest.py due to 'gbk' codec can't decode byte 0x99 in position 471: illegal multibyte sequence
warn(f"Unable to parse file {file_name} due to {error}")
D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\isort\main.py:107: UserWarning: Unable to parse file tests\test_features.py due to 'gbk' codec can't decode byte 0x99 in position 471: illegal multibyte sequence
warn(f"Unable to parse file {file_name} due to {error}")
D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\isort\main.py:107: UserWarning: Unable to parse file tests\test_prediction.py due to 'gbk' codec can't decode byte 0x99 in position 471: illegal multibyte sequence
warn(f"Unable to parse file {file_name} due to {error}")
lint run-test: commands[1] | black regression_model tests
Traceback (most recent call last):
File "C:\Users\songyq\anaconda3\lib\runpy.py", line 194, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\songyq\anaconda3\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\Scripts\black.EXE_main.py", line 7, in
File "D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\black_init.py", line 6606, in patched_main
patch_click()
File "D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\black_init.py", line 6595, in patch_click
from click import _unicodefun # type: ignore
ImportError: cannot import name 'unicodefun' from 'click' (D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\lib\site-packages\click_init.py)
ERROR: InvocationError for command 'D:\Users\songyq\Documents\s_scripts\Udemy_Deployment_of_Machine_Learning_Models\section-05-production-model-package.tox\test_package\Scripts\black.EXE' regression_model tests (exited with code 1)
this can be fixed by change the "section-05-production-model-package\requirements\test_requirements.txt"
black==22.3.0
similar issue : https://stackoverflow.com/questions/71673404/importerror-cannot-import-name-unicodefun-from-click