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

Fatal Internal error while trying to unset configuration #9330

Closed
TorstenRobitzki opened this issue Dec 21, 2020 · 10 comments · Fixed by #11073
Closed

Fatal Internal error while trying to unset configuration #9330

TorstenRobitzki opened this issue Dec 21, 2020 · 10 comments · Fixed by #11073
Labels
C: configuration Configuration management and loading state: needs reproducer Need to reproduce issue

Comments

@TorstenRobitzki
Copy link

Environment

  • pip version: 20.3.3
  • Python version: 3.9.0
  • OS: OS/X 10.15.7

I'm using pyenv. I'm not an active Python developer, so please bear with me if I'm missing important details.

Description
I try to remove the "global.extra-index-url" key from the pip configuration by:

`pip config unset global.extra-index-url`

Which then responses with:

`ERROR: Fatal Internal error [id=1]. Please report as a bug.`

Expected behavior

I would expect to either remove the key or to prompt an error message that I could use to investigate into the reason of the failing of the command.

How to Reproduce
Sorry, I don't have any clue, how this could be reproduced.

Output

% pip config unset global.extra-index-url 
ERROR: Fatal Internal error [id=1]. Please report as a bug.

Maybe the current value of the configuration gives a clue (some values slightly changed):

% pip config list
global.extra-index-url='\nhttps://torsten:keykeykeykey@customer.jfrog.io/customer/api/pypi/    https://customer.jfrog.io/customer/api/pypi/customer-pip3-stable/simple\nhttps://pypi.python.org/simple/'

There was a similar issue reported last year: #6940 Unfortunately, the issue was closed without giving and hint to how it was resolved.

@uranusjr
Copy link
Member

cc @dinko-pehar (who opened #6940)

@uranusjr uranusjr added C: configuration Configuration management and loading state: needs eyes Needs a maintainer/triager to take a closer look labels Dec 21, 2020
@pradyunsg
Copy link
Member

This probably has something to do with the fact that this is a multi-value property.

@TorstenRobitzki
Copy link
Author

My workaround was, to edit ~/.pip/pip.conf and to remove that line with an editor.

@amaank404
Copy link

is there a verbose option, you should have tried that

@NoahGorny
Copy link
Contributor

I am unable to reproduce

@pradyunsg
Copy link
Member

Ditto. I'm not able to reproduce this either?

@pradyunsg pradyunsg added S: awaiting response Waiting for a response/more information state: needs reproducer Need to reproduce issue and removed state: needs eyes Needs a maintainer/triager to take a closer look labels Mar 6, 2021
@TorstenRobitzki
Copy link
Author

I got into the situation by following the instructions of a colleague to edit ~/.pip/pip.conf and to insert something like this:

[global]
    extra-index-url =
        https://google.de
        https://pypi.python.org/simple/

If I set the config file to this content, I get reproducible the above error message.

@no-response no-response bot removed the S: awaiting response Waiting for a response/more information label Mar 6, 2021
@tnielens
Copy link

I do reproduce similar issues. I suspect it's related to the legacy configuration path ~/.pip/pip.conf. Moving the file to the new default path ~/.config/pip/pip/conf solves the issue.

@wimglenn
Copy link
Contributor

I also got there. Not sure how.

$ pip --version
pip 22.0.4 from /private/tmp/v/.venv/lib/python3.10/site-packages/pip (python 3.10)
$ pip config debug
env_var:
env:
global:
  /Library/Application Support/pip/pip.conf, exists: False
site:
  /private/tmp/v/.venv/pip.conf, exists: True
    global.index-url: http://localhost:8080/
user:
  /Users/wim/.pip/pip.conf, exists: False
  /Users/wim/.config/pip/pip.conf, exists: False
$ cat .venv/pip.conf 
[global]
index_url = http://localhost:8080/

$  v pip config unset global.index-url    
ERROR: Fatal Internal error [id=1]. Please report as a bug.
$ pip config unset global.index-url -vvvv
Skipping file '/Library/Application Support/pip/pip.conf' (variant: global)
Skipping file '/Users/wim/.pip/pip.conf' (variant: user)
Skipping file '/Users/wim/.config/pip/pip.conf' (variant: user)
For variant 'site', will try loading '/private/tmp/v/.venv/pip.conf'
Will be working with site variant only
ERROR: Fatal Internal error [id=1]. Please report as a bug.

@wimglenn
Copy link
Contributor

OK, I scratched the itch and have a reproducer:

pip config set global.index_url http://localhost:8080/
pip config unset global.index-url

note the order of dashes and underscores.

wimglenn added a commit to wimglenn/pip that referenced this issue Apr 30, 2022
inmantaci pushed a commit to inmanta/inmanta-core that referenced this issue May 12, 2022
Bumps [pip](https://github.com/pypa/pip) from 22.0.4 to 22.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/pip/blob/main/NEWS.rst">pip's changelog</a>.</em></p>
<blockquote>
<h1>22.1 (2022-05-11)</h1>
<h2>Process</h2>
<ul>
<li>Enable the <code>importlib.metadata</code> metadata implementation by default on
Python 3.11 (or later). The environment variable <code>_PIP_USE_IMPORTLIB_METADATA</code>
can still be used to enable the implementation on 3.10 and earlier, or disable
it on 3.11 (by setting it to <code>0</code> or <code>false</code>).</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>Revert <code>[#9243](pypa/pip#9243) &lt;https://github.com/pypa/pip/issues/9243&gt;</code>_ since it introduced a regression in certain edge cases. (<code>[#10962](pypa/pip#10962) &lt;https://github.com/pypa/pip/issues/10962&gt;</code>_)</li>
<li>Fix missing <code>REQUESTED</code> metadata when using URL constraints. (<code>[#11079](pypa/pip#11079) &lt;https://github.com/pypa/pip/issues/11079&gt;</code>_)</li>
<li><code>pip config</code> now normalizes names by converting underscores into dashes. (<code>[#9330](pypa/pip#9330) &lt;https://github.com/pypa/pip/issues/9330&gt;</code>_)</li>
</ul>
<h1>22.1b1 (2022-04-30)</h1>
<h2>Process</h2>
<ul>
<li>Start migration of distribution metadata implementation from <code>pkg_resources</code>
to <code>importlib.metadata</code>. The new implementation is currently not exposed in
any user-facing way, but included in the code base for easier development.</li>
</ul>
<h2>Deprecations and Removals</h2>
<ul>
<li>Drop <code>--use-deprecated=out-of-tree-build</code>, according to deprecation message. (<code>[#11001](pypa/pip#11001) &lt;https://github.com/pypa/pip/issues/11001&gt;</code>_)</li>
</ul>
<h2>Features</h2>
<ul>
<li>Add option to install and uninstall commands to opt-out from running-as-root warning. (<code>[#10556](pypa/pip#10556) &lt;https://github.com/pypa/pip/issues/10556&gt;</code>_)</li>
<li>Include Project-URLs in <code>pip show</code> output. (<code>[#10799](pypa/pip#10799) &lt;https://github.com/pypa/pip/issues/10799&gt;</code>_)</li>
<li>Improve error message when <code>pip config edit</code> is provided an editor that
doesn't exist. (<code>[#10812](pypa/pip#10812) &lt;https://github.com/pypa/pip/issues/10812&gt;</code>_)</li>
<li>Add a user interface for supplying config settings to build backends. (<code>[#11059](pypa/pip#11059) &lt;https://github.com/pypa/pip/issues/11059&gt;</code>_)</li>
<li>Add support for Powershell autocompletion. (<code>[#9024](pypa/pip#9024) &lt;https://github.com/pypa/pip/issues/9024&gt;</code>_)</li>
<li>Explains why specified version cannot be retrieved when <em>Requires-Python</em> is not satisfied. (<code>[#9615](pypa/pip#9615) &lt;https://github.com/pypa/pip/issues/9615&gt;</code>_)</li>
<li>Validate build dependencies when using <code>--no-build-isolation</code>. (<code>[#9794](pypa/pip#9794) &lt;https://github.com/pypa/pip/issues/9794&gt;</code>_)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>Fix conditional checks to prevent <code>pip.exe</code> from trying to modify itself, on Windows. (<code>[#10560](pypa/pip#10560) &lt;https://github.com/pypa/pip/issues/10560&gt;</code>_)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/pip/commit/3c953322c6683b3f0f4d465d9fa361de55358462"><code>3c95332</code></a> Bump for release</li>
<li><a href="https://github.com/pypa/pip/commit/bd54382b59b45975fd4ea00533fb92bd85e3b98d"><code>bd54382</code></a> Update AUTHORS.txt</li>
<li><a href="https://github.com/pypa/pip/commit/c86f9f12594c0e05ed2de31a652bc1eaadb970d1"><code>c86f9f1</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11044">#11044</a> from uranusjr/importlib-metadata-backend-in-3.11</li>
<li><a href="https://github.com/pypa/pip/commit/bd9bcef8b3262c513a0dd614731cfe8db8d64125"><code>bd9bcef</code></a> Enable importlib.metadata backend on Python 3.11</li>
<li><a href="https://github.com/pypa/pip/commit/cb24fb4052ca8ab8009866b0de61980c81a7e13c"><code>cb24fb4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11085">#11085</a> from pypa/revert-10962-fix-hashes</li>
<li><a href="https://github.com/pypa/pip/commit/6ad9a21a43b7fe5d436472de2492069c4541bf06"><code>6ad9a21</code></a> 📰</li>
<li><a href="https://github.com/pypa/pip/commit/cf3696a81b341925f82f20cb527e656176987565"><code>cf3696a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11080">#11080</a> from sbidoul/requested-with-constraints</li>
<li><a href="https://github.com/pypa/pip/commit/bab5bfce502be78318ab2a3b364b4923d657c854"><code>bab5bfc</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11073">#11073</a> from wimglenn/issue-9330</li>
<li><a href="https://github.com/pypa/pip/commit/ae1c2e35e493d7a07cb0d300451625629ae07ce9"><code>ae1c2e3</code></a> Grammar fix in changelog</li>
<li><a href="https://github.com/pypa/pip/commit/8d51b8365501132c4f9fe929aa40bd66c9eaa60e"><code>8d51b83</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11087">#11087</a> from mkniewallner/fix-version-changelog</li>
<li>Additional commits viewable in <a href="https://github.com/pypa/pip/compare/22.0.4...22.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pip&package-manager=pip&previous-version=22.0.4&new-version=22.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
inmantaci pushed a commit to inmanta/inmanta-core that referenced this issue May 12, 2022
Bumps [pip](https://github.com/pypa/pip) from 22.0.4 to 22.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/pip/blob/main/NEWS.rst">pip's changelog</a>.</em></p>
<blockquote>
<h1>22.1 (2022-05-11)</h1>
<h2>Process</h2>
<ul>
<li>Enable the <code>importlib.metadata</code> metadata implementation by default on
Python 3.11 (or later). The environment variable <code>_PIP_USE_IMPORTLIB_METADATA</code>
can still be used to enable the implementation on 3.10 and earlier, or disable
it on 3.11 (by setting it to <code>0</code> or <code>false</code>).</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>Revert <code>[#9243](pypa/pip#9243) &lt;https://github.com/pypa/pip/issues/9243&gt;</code>_ since it introduced a regression in certain edge cases. (<code>[#10962](pypa/pip#10962) &lt;https://github.com/pypa/pip/issues/10962&gt;</code>_)</li>
<li>Fix missing <code>REQUESTED</code> metadata when using URL constraints. (<code>[#11079](pypa/pip#11079) &lt;https://github.com/pypa/pip/issues/11079&gt;</code>_)</li>
<li><code>pip config</code> now normalizes names by converting underscores into dashes. (<code>[#9330](pypa/pip#9330) &lt;https://github.com/pypa/pip/issues/9330&gt;</code>_)</li>
</ul>
<h1>22.1b1 (2022-04-30)</h1>
<h2>Process</h2>
<ul>
<li>Start migration of distribution metadata implementation from <code>pkg_resources</code>
to <code>importlib.metadata</code>. The new implementation is currently not exposed in
any user-facing way, but included in the code base for easier development.</li>
</ul>
<h2>Deprecations and Removals</h2>
<ul>
<li>Drop <code>--use-deprecated=out-of-tree-build</code>, according to deprecation message. (<code>[#11001](pypa/pip#11001) &lt;https://github.com/pypa/pip/issues/11001&gt;</code>_)</li>
</ul>
<h2>Features</h2>
<ul>
<li>Add option to install and uninstall commands to opt-out from running-as-root warning. (<code>[#10556](pypa/pip#10556) &lt;https://github.com/pypa/pip/issues/10556&gt;</code>_)</li>
<li>Include Project-URLs in <code>pip show</code> output. (<code>[#10799](pypa/pip#10799) &lt;https://github.com/pypa/pip/issues/10799&gt;</code>_)</li>
<li>Improve error message when <code>pip config edit</code> is provided an editor that
doesn't exist. (<code>[#10812](pypa/pip#10812) &lt;https://github.com/pypa/pip/issues/10812&gt;</code>_)</li>
<li>Add a user interface for supplying config settings to build backends. (<code>[#11059](pypa/pip#11059) &lt;https://github.com/pypa/pip/issues/11059&gt;</code>_)</li>
<li>Add support for Powershell autocompletion. (<code>[#9024](pypa/pip#9024) &lt;https://github.com/pypa/pip/issues/9024&gt;</code>_)</li>
<li>Explains why specified version cannot be retrieved when <em>Requires-Python</em> is not satisfied. (<code>[#9615](pypa/pip#9615) &lt;https://github.com/pypa/pip/issues/9615&gt;</code>_)</li>
<li>Validate build dependencies when using <code>--no-build-isolation</code>. (<code>[#9794](pypa/pip#9794) &lt;https://github.com/pypa/pip/issues/9794&gt;</code>_)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>Fix conditional checks to prevent <code>pip.exe</code> from trying to modify itself, on Windows. (<code>[#10560](pypa/pip#10560) &lt;https://github.com/pypa/pip/issues/10560&gt;</code>_)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/pip/commit/3c953322c6683b3f0f4d465d9fa361de55358462"><code>3c95332</code></a> Bump for release</li>
<li><a href="https://github.com/pypa/pip/commit/bd54382b59b45975fd4ea00533fb92bd85e3b98d"><code>bd54382</code></a> Update AUTHORS.txt</li>
<li><a href="https://github.com/pypa/pip/commit/c86f9f12594c0e05ed2de31a652bc1eaadb970d1"><code>c86f9f1</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11044">#11044</a> from uranusjr/importlib-metadata-backend-in-3.11</li>
<li><a href="https://github.com/pypa/pip/commit/bd9bcef8b3262c513a0dd614731cfe8db8d64125"><code>bd9bcef</code></a> Enable importlib.metadata backend on Python 3.11</li>
<li><a href="https://github.com/pypa/pip/commit/cb24fb4052ca8ab8009866b0de61980c81a7e13c"><code>cb24fb4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11085">#11085</a> from pypa/revert-10962-fix-hashes</li>
<li><a href="https://github.com/pypa/pip/commit/6ad9a21a43b7fe5d436472de2492069c4541bf06"><code>6ad9a21</code></a> 📰</li>
<li><a href="https://github.com/pypa/pip/commit/cf3696a81b341925f82f20cb527e656176987565"><code>cf3696a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11080">#11080</a> from sbidoul/requested-with-constraints</li>
<li><a href="https://github.com/pypa/pip/commit/bab5bfce502be78318ab2a3b364b4923d657c854"><code>bab5bfc</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11073">#11073</a> from wimglenn/issue-9330</li>
<li><a href="https://github.com/pypa/pip/commit/ae1c2e35e493d7a07cb0d300451625629ae07ce9"><code>ae1c2e3</code></a> Grammar fix in changelog</li>
<li><a href="https://github.com/pypa/pip/commit/8d51b8365501132c4f9fe929aa40bd66c9eaa60e"><code>8d51b83</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11087">#11087</a> from mkniewallner/fix-version-changelog</li>
<li>Additional commits viewable in <a href="https://github.com/pypa/pip/compare/22.0.4...22.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pip&package-manager=pip&previous-version=22.0.4&new-version=22.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: configuration Configuration management and loading state: needs reproducer Need to reproduce issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants