question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Post setup Python step fails (pipenv cache)

See original GitHub issue

Description: A clear and concise description of what the bug is.

Hey! So this used to work just a few days ago. We’ve been having some issues with cache in the last few days (see here for details), this is a brand new issue which I think might or might not be related to the previous problem. Simply put, the action fails in the post step with the following message.

Post job cleanup.
[2](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:20:2)
Error: Cache folder path is retrieved for pipenv but doesn't exist on disk: /home/runner/.local/share/virtualenvs

Here’s the actual step:

Run actions/setup-python@v3.1.2
[2](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:2)
  with:
[3](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:3)
    cache: pipenv
[4](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:4)
    python-version: 3.9.13
[5](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:5)
    token: ***
[6](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:7)
Successfully setup CPython (3.9.13)
[7](https://github.com/<org>/<repo>/runs/6889538635?check_suite_focus=true#step:5:8)
pipenv cache is not found

Action version: Specify the action version

3.1.2

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

3.9.13

Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.

Expected behavior: A description of what you expected to happen.

No issue occurs, the same way it used to work a week ago.

Actual behavior: A description of what is actually happening.

This error message appears on every run.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mrluboscommented, Jun 23, 2022

Hi @dmitry-shibanov no updates beyond that this is still an issue. I tried removing the cache key which obviously removes the error but after adding it back, the error came back too. So I am stuck it seems between not having caching or receiving this error. I don’t have this confirmed yet, but I suspect this error happens only on the master branch and not in other branches. Also this is interesting to me, after I added back the cache key, the next run produced this:

Run actions/setup-python@v3.1.2
  with:
    cache: pipenv
    python-version: 3.9.13
    token: ***
Successfully setup CPython (3.9.13)
pipenv cache is not found

And then in post step

Post job cleanup.
Error: Cache folder path is retrieved for pipenv but doesn't exist on disk: /home/runner/.local/share/virtualenvs
0reactions
matteiuscommented, Nov 29, 2022

It would appear the pipenv cache implementation assumes it will be at this location, making PIPENV_VENV_IN_PROJECT probably unworkable at present versions of setup-python actions: https://github.com/actions/setup-python/blob/main/src/cache-distributions/pipenv-cache.ts#L25

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle GitHub Actions deleting its cache after 7 days
First alternative: using a separate workflow, with a schedule trigger event, you can run workflows on a recurring schedule.
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
The cache may contain faulty results if a bug causes the format to corrupt, even after the bug is fixed.
Read more >
Pip cache not working for wxPython - Atlassian Community
So the issue here seems to be that pipenv is not using that cache, or looking at somewhere else. In this case, this...
Read more >
Caching Dependencies - CircleCI
With dependencies restored from a cache, commands like yarn install need ... Caching a failed dependency step will require you to change the...
Read more >
pipenv Documentation - Read the Docs
Sending build context to Docker daemon 1.122MB. Step 1/12 : FROM docker.io/python:3.9 AS builder. ---> 81f391f1a7d7. Step 2/12 : RUN pip install --user...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found