TypeError: 'NoneType' object is not callable CircleCI
TypeError: 'NoneType' object is not callable CircleCI
我正在尝试让我的 config.yml 文件中的这段代码通过 CircleCI 工作:
cd backend
pip install pipenv
pipenv install
当上传到 circleci 时,我得到了这部分的以下信息,其他一切都通过了:
Requirement already satisfied: pipenv in /usr/local/lib/python3.7/site-packages (2020.5.28)
Requirement already satisfied: virtualenv in /usr/local/lib/python3.7/site-packages (from pipenv) (20.0.21)
Requirement already satisfied: pip>=18.0 in /usr/local/lib/python3.7/site-packages (from pipenv) (20.1.1)
Requirement already satisfied: setuptools>=36.2.1 in /usr/local/lib/python3.7/site-packages (from pipenv) (46.4.0)
Requirement already satisfied: virtualenv-clone>=0.2.5 in /usr/local/lib/python3.7/site-packages (from pipenv) (0.5.4)
Requirement already satisfied: certifi in /usr/local/lib/python3.7/site-packages (from pipenv) (2020.4.5.1)
Requirement already satisfied: distlib<1,>=0.3.0 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (0.3.0)
Requirement already satisfied: importlib-metadata<2,>=0.12; python_version < "3.8" in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (1.1.3)
Requirement already satisfied: appdirs<2,>=1.4.3 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (1.4.4)
Requirement already satisfied: filelock<4,>=3.0.0 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (3.0.12)
Requirement already satisfied: six<2,>=1.9.0 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (1.15.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->virtualenv->pipenv) (3.1.0)
Creating a virtualenv for this project…
Pipfile: /home/circleci/cyber-dive/Cyber-Dive-App/backend/Pipfile
Using /usr/local/bin/python3 (3.7.7) to create virtualenv…
created virtual environment CPython3.7.7.final.0-64 in 506ms
creator CPython3Posix(dest=/home/circleci/cyber-dive/Cyber-Dive-App/backend/.venv, clear=False, global=False)
seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/circleci/.local/share/virtualenv/seed-app-data/v1.0.1)
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Virtualenv location: /home/circleci/cyber-dive/Cyber-Dive-App/backend/.venv
Installing dependencies from Pipfile.lock (9ef944)…
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/cli/command.py", line 254, in install
editable_packages=state.installstate.editables,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1874, in do_install
keep_outdated=keep_outdated
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1253, in do_init
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 809, in do_install_dependencies
deps_list = list(lockfile.get_requirements(dev=dev, only=requirements))
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/lockfile.py", line 272, in get_requirements
yield Requirement.from_pipfile(k, v)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1183, in from_pipfile
r = VCSRequirement.from_pipfile(name, pipfile)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 897, in from_pipfile
return cls(**creation_args)
File "<attrs generated init 3bab60f45f8eb7fe6e20ab91412def0e78d5dff6>", line 31, in __init__
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 706, in get_link
extras=self.extras,
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/utils.py", line 100, in build_vcs_link
return create_link(uri)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/utils.py", line 40, in create_link
return Link(link)
TypeError: 'NoneType' object is not callable
Exited with code exit status 1
CircleCI received exit code 1
`
When trying to run these tasks locally, here is what I get in my terminal after pipenv install:
ValueError: Path not found or generated: WindowsPath('c:/program files/git/mingw64/bin')
我为此绞尽脑汁,但一无所获。它在 ValueError 中指定的路径确实存在于我的计算机上,我目前有 Python 3.8.2。我还安装了程序中列出的 3.7.7。请帮忙,因为我很难过。
好的,找到问题了,似乎是在 2020-05-28 发布了导致此问题的新版本 pipenv,circle 仍在使用它,pipenv 今天发布了一个新版本,6 月 2 日 2020.6.2
解决了这个问题,我刚刚添加了
pip install pipenv==2020.6.2
循环配置和构建再次运行
编辑:如果您在 circleci 中使用缓存,您必须首先明确卸载来自圆 docker 图像的版本,否则它仍然会失败
pip uninstall pipenv -y
我正在尝试让我的 config.yml 文件中的这段代码通过 CircleCI 工作:
cd backend
pip install pipenv
pipenv install
当上传到 circleci 时,我得到了这部分的以下信息,其他一切都通过了:
Requirement already satisfied: pipenv in /usr/local/lib/python3.7/site-packages (2020.5.28)
Requirement already satisfied: virtualenv in /usr/local/lib/python3.7/site-packages (from pipenv) (20.0.21)
Requirement already satisfied: pip>=18.0 in /usr/local/lib/python3.7/site-packages (from pipenv) (20.1.1)
Requirement already satisfied: setuptools>=36.2.1 in /usr/local/lib/python3.7/site-packages (from pipenv) (46.4.0)
Requirement already satisfied: virtualenv-clone>=0.2.5 in /usr/local/lib/python3.7/site-packages (from pipenv) (0.5.4)
Requirement already satisfied: certifi in /usr/local/lib/python3.7/site-packages (from pipenv) (2020.4.5.1)
Requirement already satisfied: distlib<1,>=0.3.0 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (0.3.0)
Requirement already satisfied: importlib-metadata<2,>=0.12; python_version < "3.8" in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (1.1.3)
Requirement already satisfied: appdirs<2,>=1.4.3 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (1.4.4)
Requirement already satisfied: filelock<4,>=3.0.0 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (3.0.12)
Requirement already satisfied: six<2,>=1.9.0 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (1.15.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->virtualenv->pipenv) (3.1.0)
Creating a virtualenv for this project…
Pipfile: /home/circleci/cyber-dive/Cyber-Dive-App/backend/Pipfile
Using /usr/local/bin/python3 (3.7.7) to create virtualenv…
created virtual environment CPython3.7.7.final.0-64 in 506ms
creator CPython3Posix(dest=/home/circleci/cyber-dive/Cyber-Dive-App/backend/.venv, clear=False, global=False)
seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/circleci/.local/share/virtualenv/seed-app-data/v1.0.1)
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Virtualenv location: /home/circleci/cyber-dive/Cyber-Dive-App/backend/.venv
Installing dependencies from Pipfile.lock (9ef944)…
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/cli/command.py", line 254, in install
editable_packages=state.installstate.editables,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1874, in do_install
keep_outdated=keep_outdated
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1253, in do_init
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 809, in do_install_dependencies
deps_list = list(lockfile.get_requirements(dev=dev, only=requirements))
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/lockfile.py", line 272, in get_requirements
yield Requirement.from_pipfile(k, v)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1183, in from_pipfile
r = VCSRequirement.from_pipfile(name, pipfile)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 897, in from_pipfile
return cls(**creation_args)
File "<attrs generated init 3bab60f45f8eb7fe6e20ab91412def0e78d5dff6>", line 31, in __init__
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 706, in get_link
extras=self.extras,
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/utils.py", line 100, in build_vcs_link
return create_link(uri)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/utils.py", line 40, in create_link
return Link(link)
TypeError: 'NoneType' object is not callable
Exited with code exit status 1
CircleCI received exit code 1
`
When trying to run these tasks locally, here is what I get in my terminal after pipenv install:
ValueError: Path not found or generated: WindowsPath('c:/program files/git/mingw64/bin')
我为此绞尽脑汁,但一无所获。它在 ValueError 中指定的路径确实存在于我的计算机上,我目前有 Python 3.8.2。我还安装了程序中列出的 3.7.7。请帮忙,因为我很难过。
好的,找到问题了,似乎是在 2020-05-28 发布了导致此问题的新版本 pipenv,circle 仍在使用它,pipenv 今天发布了一个新版本,6 月 2 日 2020.6.2
解决了这个问题,我刚刚添加了
pip install pipenv==2020.6.2
循环配置和构建再次运行
编辑:如果您在 circleci 中使用缓存,您必须首先明确卸载来自圆 docker 图像的版本,否则它仍然会失败
pip uninstall pipenv -y