Hi, yatain:
The openstacksdk project also cannot check pep8, other projects is ok such as nova, cyborg. the error is as follows.
### version information
```
pre-commit version: 3.3.2
git --version: git version 2.25.1
sys.version:
3.8.10 (default, Mar 13 2023, 10:26:41)
[GCC 9.4.0]
sys.executable: /opt/stack/openstacksdk/.tox/pep8/bin/python
os.name: posix
sys.platform: linux
```
### error information
```
An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/git', 'fetch', 'origin', '--tags')
return code: 128
stdout: (none)
stderr: (none)
```
```
Traceback (most recent call last):
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/store.py", line 202, in clone_strategy
self._shallow_clone(ref, _git_cmd)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/store.py", line 184, in _shallow_clone
git_cmd('-c', git_config, 'fetch', 'origin', ref, '--depth=1')
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/store.py", line 199, in _git_cmd
cmd_output_b('git', *args, cwd=directory, env=env)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/util.py", line 110, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/usr/bin/git', '-c', 'protocol.version=2', 'fetch', 'origin', 'v4.4.0', '--depth=1')
return code: 128
stdout: (none)
stderr: (none)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/error_handler.py", line 73, in error_handler
yield
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/main.py", line 414, in main
return run(args.config, store, args)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/commands/run.py", line 425, in run
for hook in all_hooks(config, store)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/repository.py", line 252, in all_hooks
return tuple(
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/repository.py", line 255, in <genexpr>
for hook in _repository_hooks(repo, store, root_config)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/repository.py", line 230, in _repository_hooks
return _cloned_repository_hooks(repo_config, store, root_config)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/repository.py", line 196, in _cloned_repository_hooks
manifest_path = os.path.join(store.clone(repo, rev), C.MANIFEST_FILE)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/store.py", line 206, in clone
return self._new_repo(repo, ref, deps, clone_strategy)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/store.py", line 163, in _new_repo
make_strategy(directory)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/store.py", line 204, in clone_strategy
self._complete_clone(ref, _git_cmd)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/store.py", line 176, in _complete_clone
git_cmd('fetch', 'origin', '--tags')
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/store.py", line 199, in _git_cmd
cmd_output_b('git', *args, cwd=directory, env=env)
File "/opt/stack/openstacksdk/.tox/pep8/lib/python3.8/site-packages/pre_commit/util.py", line 110, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/usr/bin/git', 'fetch', 'origin', '--tags')
return code: 128
stdout: (none)
stderr: (none)
Please help, thanks.
发件人: Alex Song (宋文平)
发送时间: 2023年5月26日 10:07
收件人: 'ykarel@redhat.com' <ykarel@redhat.com>
抄送: 'openstack-discuss@lists.openstack.org' <openstack-discuss@lists.openstack.org>
主题: 答复: pep8 error of newest devstack
Thanks, Yatin Karel, it’s really the pypi problem.
发件人: Yatin Karel [mailto:ykarel@redhat.com]
发送时间: 2023年5月25日 23:56
收件人: Alex Song (宋文平) <songwenping@inspur.com>
抄送: openstack-discuss <openstack-discuss@lists.openstack.org>
主题: Re: pep8 error of newest devstack
Hi Alex,
The issue looks due to an outdated mirror(i.e https://pypi.tuna.tsinghua.edu.cn), it should work fine with an up to date mirror. See below 14.3.0 is not available in the pypi index you using:-
$ curl https://pypi.tuna.tsinghua.edu.cn/simple/oslo-messaging/ 2>/dev/null|grep oslo.messaging-14
<a href="../../packages/a2/2c/5e7bac88a7978bb4dc3d63c4f45130cec4390876f67f938e45ca541e9143/oslo.messaging-14.0.0-py3-none-any.whl#sha256=1b0fdbf4c87ebad9e188f8bca536ade08a381f579df822b0041548b260f7d14d" data-requires-python=">=3.8">oslo.messaging-14.0.0-py3-none-any.whl</a><br/>
<a href="../../packages/73/5c/c188660f90533a4fd88cac355204160da3ab118e3aa62bdfadbcb3422eb2/oslo.messaging-14.0.0.tar.gz#sha256=49917adeef2f795c9d9fad8714997cabb3df2ca7fac57c8bb119617bff2874c3" data-requires-python=">=3.8">oslo.messaging-14.0.0.tar.gz</a><br/>
<a href="../../packages/12/d7/db0c6dc8149fa4e601b8115af6878183b7f280793ccdf3a70f4c9d0c92fa/oslo.messaging-14.1.0-py3-none-any.whl#sha256=9ae3d22df97190a35124a8f28cc0ceb64de99570b730a41d14d103b7ebf78c37" data-requires-python=">=3.8">oslo.messaging-14.1.0-py3-none-any.whl</a><br/>
<a href="../../packages/6a/52/f1fb2a8b00a61f8dd816efe319756243145a7f0583c9c1a4c1819c14d6d5/oslo.messaging-14.1.0.tar.gz#sha256=f2947ed073976458dc2d0774943ccf6d0c4d219c8d36f96ee2eae97aaa872565" data-requires-python=">=3.8">oslo.messaging-14.1.0.tar.gz</a><br/>
<a href="../../packages/74/54/2cfb08e99e0e7bf30dd9ef182c690380478e9310d067f50d2255554f097c/oslo.messaging-14.2.0-py3-none-any.whl#sha256=25d6c65bb3ff78e7b3d135f8440df35838ee780b475153920c774e0c0b68398e" data-requires-python=">=3.8">oslo.messaging-14.2.0-py3-none-any.whl</a><br/>
<a href="../../packages/9b/6c/e61332678e4c665f18144dc5192c0a6f4f37b1ce0a7c5e5d5a38f628342f/oslo.messaging-14.2.0.tar.gz#sha256=27088ee572d9a0f08e611fce77b476f3aa1e35395fd3a9a38d5c310c9699db0e" data-requires-python=">=3.8">oslo.messaging-14.2.0.tar.gz</a><br/>
V/s
$ curl https://pypi.org/simple/oslo-messaging/ 2>/dev/null|grep oslo.messaging-14
<a href="https://files.pythonhosted.org/packages/a2/2c/5e7bac88a7978bb4dc3d63c4f45130cec4390876f67f938e45ca541e9143/oslo.messaging-14.0.0-py3-none-any.whl#sha256=1b0fdbf4c87ebad9e188f8bca536ade08a381f579df822b0041548b260f7d14d" data-requires-python=">=3.8" >oslo.messaging-14.0.0-py3-none-any.whl</a><br />
<a href="https://files.pythonhosted.org/packages/73/5c/c188660f90533a4fd88cac355204160da3ab118e3aa62bdfadbcb3422eb2/oslo.messaging-14.0.0.tar.gz#sha256=49917adeef2f795c9d9fad8714997cabb3df2ca7fac57c8bb119617bff2874c3" data-requires-python=">=3.8" >oslo.messaging-14.0.0.tar.gz</a><br />
<a href="https://files.pythonhosted.org/packages/12/d7/db0c6dc8149fa4e601b8115af6878183b7f280793ccdf3a70f4c9d0c92fa/oslo.messaging-14.1.0-py3-none-any.whl#sha256=9ae3d22df97190a35124a8f28cc0ceb64de99570b730a41d14d103b7ebf78c37" data-requires-python=">=3.8" >oslo.messaging-14.1.0-py3-none-any.whl</a><br />
<a href="https://files.pythonhosted.org/packages/6a/52/f1fb2a8b00a61f8dd816efe319756243145a7f0583c9c1a4c1819c14d6d5/oslo.messaging-14.1.0.tar.gz#sha256=f2947ed073976458dc2d0774943ccf6d0c4d219c8d36f96ee2eae97aaa872565" data-requires-python=">=3.8" >oslo.messaging-14.1.0.tar.gz</a><br />
<a href="https://files.pythonhosted.org/packages/74/54/2cfb08e99e0e7bf30dd9ef182c690380478e9310d067f50d2255554f097c/oslo.messaging-14.2.0-py3-none-any.whl#sha256=25d6c65bb3ff78e7b3d135f8440df35838ee780b475153920c774e0c0b68398e" data-requires-python=">=3.8" >oslo.messaging-14.2.0-py3-none-any.whl</a><br />
<a href="https://files.pythonhosted.org/packages/9b/6c/e61332678e4c665f18144dc5192c0a6f4f37b1ce0a7c5e5d5a38f628342f/oslo.messaging-14.2.0.tar.gz#sha256=27088ee572d9a0f08e611fce77b476f3aa1e35395fd3a9a38d5c310c9699db0e" data-requires-python=">=3.8" >oslo.messaging-14.2.0.tar.gz</a><br />
<a href="https://files.pythonhosted.org/packages/59/c3/a1369b70cfff2864fd19aeb17d6167a0fd7630dcdd01514cfe74da5388f0/oslo.messaging-14.3.0-py3-none-any.whl#sha256=23fb10d2232ab07ea3f60ef5675635e2ef5a131cbefc01c59491b44897378859" data-requires-python=">=3.8" data-dist-info-metadata="sha256=ea6f422823b48d9513008a2e8c86b57ebc80a61e3fae6b8e718e8674f8ac11df">oslo.messaging-14.3.0-py3-none-any.whl</a><br />
<a href="https://files.pythonhosted.org/packages/b9/92/afd6f5c27fc2cde5c81ada2615b6ee3945319f7867d3d568b379c19b9351/oslo.messaging-14.3.0.tar.gz#sha256=92493cb36594401012dda60a5a269d716a67e2cc363c3803c96657772f284c16" data-requires-python=">=3.8" >oslo.messaging-14.3.0.tar.gz</a><br />
Thanks and Regards
Yatin Karel
On Thu, May 25, 2023 at 11:46 AM Alex Song (宋文平) <songwenping@inspur.com> wrote:
Hi,
When I check pep8 with the newest devstack env by the cmd ‘tox –e pep8’, it raise many packages conflict. The log is as follows.
I hope you can help us. Thank you very much.