Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PR4 の Pipfile の設定がエラーになるようになった #7

Closed
yuichi-github opened this issue Sep 5, 2023 · 2 comments
Closed

Comments

@yuichi-github
Copy link

yuichi-github commented Sep 5, 2023

#3 で報告され #4 で対応された内容が 2023/8/21 以降エラーになっています。
(私達のGitHub環境。8/18 までは正常だった。)

GitHub Actions 該当箇所抜粋
- name: Extract
  shell: bash
  run: |
    export PIPENV_PIPFILE=$(pwd)/Pipfile
    pipenv install
    pipenv run python extract_vba_source.py \
      --dest ${{ env.VBA_DIR }} \
      --src-encoding='shift_jis' \
      --out-encoding='utf8' \
      --recursive \
      *.xlsm
エラーログ
Run export PIPENV_PIPFILE=$(pwd)/Pipfile
Creating a virtualenv for this project...
Pipfile: /home/runner/work/xxxxx/xxxxx/Pipfile
Using default python from /opt/hostedtoolcache/Python/3.[1](https://github.com/yyy/xxxxx/actions/runs/5920700006/job/16052298718#step:5:1)0.12/x64/bin/python (3.10.12) to create virtualenv...
created virtual environment CPython3.10.12.final.0-64 in 567ms
  creator CPython3Posix(dest=/home/runner/.local/share/virtualenvs/xxxxx-hiJBg0Uc, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
    added seed packages: pip==23.2.1, setuptools==68.0.0, wheel==0.41.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

Successfully created virtual environment!
Virtualenv location: /home/runner/.local/share/virtualenvs/xxxxx-hiJBg0Uc
Pipfile.lock not found, creating...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...

Locking Failed!
INFO:pipenv.patched.pip._internal.network.download:Downloading https://github.com/kijeong/oletools/archive/refs/heads/add/projectcompatversion_record.zip
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/resolver.py", line 668, in <module>
    main()
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/resolver.py", line 654, in main
    _main(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/resolver.py", line 641, in _main
    resolve_packages(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/resolver.py", line 608, in resolve_packages
    results, resolver = resolve(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/resolver.py", line 588, in resolve
    return resolve_deps(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/utils/resolver.py", line 841, in resolve_deps
    results, hashes, internal_resolver = actually_resolve_deps(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/utils/resolver.py", line 603, in actually_resolve_deps
    resolver = Resolver.create(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/utils/resolver.py", line 206, in create
    package_name = determine_package_name(install_req)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/utils/dependencies.py", line 745, in determine_package_name
    raise ValueError(f"Could not determine package name from {package}")
ValueError: Could not determine package name from https://github.com/kijeong/oletools/archive/refs/heads/add/projectcompatversion_record.zip

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.12/x64/bin/pipenv", line 8, in <module>
    sys.exit(cli())
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/cli/options.py", line 58, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1[40](https://github.com/yyy/xxxxx/actions/runs/5920700006/job/16052298718#step:5:41)4, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/cli/command.py", line 209, in install
    do_install(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/routines/install.py", line 162, in do_install
    do_init(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/routines/install.py", line 638, in do_init
    do_lock(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/routines/lock.py", line 65, in do_lock
    venv_resolve_deps(
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/utils/resolver.py", line 782, in venv_resolve_deps
    c = resolve(cmd, st, project=project)
  File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/pipenv/utils/resolver.py", line 6[51](https://github.com/yyy/xxxxx/actions/runs/5920700006/job/16052298718#step:5:52), in resolve
    raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!
Error: Process completed with exit code 1.

まずはご報告させていただきます。
Pythonエコシステムには明るくなく...修正を試みることができておらず、恐縮です。

# takerukoさんのこの仕組みにたいへん助けられています。ありがとうございます。

@takeruko
Copy link
Owner

takeruko commented Sep 5, 2023

@yuichi-github さん、ご報告ありがとうございます。
どうやらpipenv v2023.8.19以降のバグみたいです。
pipenv v2023.7.23であれば正常に動作する事が確認できたので、
お手数ですが、pipenvをv2023.7.23にダウングレードして試していただけないでしょうか。

pipenvをインストールしている箇所を
pip install pipenv
から
pip install pipenv==2023.7.23
に変更すればよいはず。

pipenvのバグについては類似のissueをいくつか見つけたのですが、いずれもcloseされているので別途issueを挙げてみます。

@yuichi-github
Copy link
Author

以下の対応で成功しました!これで困りごとは無くなりました。ありがとうございます。

どうやらpipenv v2023.8.19以降のバグみたいです。
pipenv v2023.7.23であれば正常に動作する事が確認できたので、
お手数ですが、pipenvをv2023.7.23にダウングレードして試していただけないでしょうか。

pipenvをインストールしている箇所を
pip install pipenv
から
pip install pipenv==2023.7.23
に変更すればよいはず。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants