Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error when using Action: Pipenv is not intended to work under the root directory, please choose another path #11

Closed
bengry opened this issue May 28, 2020 · 13 comments

Comments

@bengry
Copy link

bengry commented May 28, 2020

In the past 24 hours or so there's been an error when trying to run the Action:

This of course fails the whole workflow.

Here are the raw logs for both steps that benjefferies/branch-protection-bot@1.0.2 is part of:
2_Build benjefferiesbranch-protection-bot@1.0.2.txt
11_Enable include administrators branch protection.txt

The error seems to be this:

2020-05-28T07:18:48.8729872Z �[91mERROR: Pipenv is not intended to work under the root directory, please choose another path.
2020-05-28T07:18:49.0731624Z The command '/bin/sh -c PIP_USER=1 PIP_IGNORE_INSTALLED=1 pipenv install --system --deploy --ignore-pipfile' returned a non-zero code: 1

@MasaGon
Copy link

MasaGon commented May 28, 2020

Same problem for me too. When I try to build Dockerfile at local, same situation.

@bengry
Copy link
Author

bengry commented May 28, 2020

Seems to be related to the release of a new version of pipenv a few hours ago. Changing the Dockerfile to install the previous version seems to have fixed worked around it:

diff --git a/Dockerfile b/Dockerfile
index 8387bbb..0ba2940 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -6,7 +6,7 @@ ENV PYTHONUSERBASE $PYROOT
 
 FROM base AS builder
 
-RUN pip install pipenv && \
+RUN pip install 'pipenv==2018.11.26' && \
     apt-get update -y && \
     apt-get install -y git

I don't know the Python ecosystem enough to tell if the new version just surfaced an issue that was previously just ignored though. Better if someone could look into changing the problematic line, so this Action can keep using the latest version of pipenv .

@finleygn
Copy link

Adding WORKDIR to the Dockerfile makes it so it finishes the build, but needs more investigation as these warnings pop up that don't look too healthy

Step 8/12 : RUN PIP_USER=1 PIP_IGNORE_INSTALLED=1 pipenv install --system --deploy --ignore-pipfile
 ---> Running in e6ab48ae83a9
Installing dependencies from Pipfile.lock (6ea5be)…
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python: not found

Output:
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python: not found

Output:
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python: not found

@amacado
Copy link

amacado commented May 28, 2020

@bengry maybe you can create a pull request for your workaround?

@bengry
Copy link
Author

bengry commented May 28, 2020

@bengry maybe you can create a pull request for your workaround?

I don't really like my workaround for not using the latest package. Let's see if @benjefferies has anything to say here.

In the meantime I forked the repo (and added the workaround) for my use of it, but I don't think it should be merged back to this repo as-is.

@benjefferies
Copy link
Owner

Good work with the investigation. It's a good chance it could have something to do with the latest version of pipenv being pushed. I can pin the pipenv version to unblock you guys for now and look at it this evening

@benjefferies
Copy link
Owner

That's merged and fixed now guys. I will take a look at what's changed in the latest pipenv that's causing these warnings

@benjefferies
Copy link
Owner

pypa/pipenv#4273

@amacado
Copy link

amacado commented May 28, 2020

That's merged and fixed now guys. I will take a look at what's changed in the latest pipenv that's causing these warnings

I can confirm the workaround is doing it's job! :)

@bengry
Copy link
Author

bengry commented May 28, 2020

That's merged and fixed now guys. I will take a look at what's changed in the latest pipenv that's causing these warnings

Thanks. Please create a tag for the latest master so we can use it with a pinned version of the repo.

@finleygn
Copy link

thanks @benjefferies !

@benjefferies
Copy link
Owner

Ah, you reminded me of something I meant to do before getting caught up looking at the issue 👍. Done https://github.com/benjefferies/branch-protection-bot/releases/tag/1.0.3

@benjefferies
Copy link
Owner

Adding WORKDIR to the Dockerfile makes it so it finishes the build, but needs more investigation as these warnings pop up that don't look too healthy

Step 8/12 : RUN PIP_USER=1 PIP_IGNORE_INSTALLED=1 pipenv install --system --deploy --ignore-pipfile
 ---> Running in e6ab48ae83a9
Installing dependencies from Pipfile.lock (6ea5be)…
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python: not found

Output:
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python: not found

Output:
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python: not found

I've raised a PR with these changes and followed up this issue with pipenv. Once it's resolved I'll merge

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

No branches or pull requests

5 participants