enhancement
good first issue
potential plugin
Stale

Auto-GPT System Awareness

### System Awareness

- [X] I have searched the existing issues

### Summary 💡

Before going out to look at the internet
It would be helpful if upon activation the AI took inventory of the system it was on and shared the available tools and capabilities
and if they were insufficient begin researching and developing GAP tools to use during the session with the expressed request to push the GAP tools via PR back to the community

### Examples 🌈

AI System initializing
- MacOS
- Python3
- Pip
- Shell Commands available...
- Desktop App skills available...

What are your goals?

### Motivation 🔦

usuability

{'base_commit': '6ff8478118935b72c35f3ec1b31e74f2a1aa2e90', 'files': [{'path': '.github/PULL_REQUEST_TEMPLATE.md', 'status': 'modified', 'Loc': {'(None, None, None)': {'mod': [44]}}}, {'path': '.github/workflows/ci.yml', 'status': 'modified', 'Loc': {'(None, None, None)': {'mod': [72]}}}, {'path': '.pre-commit-config.yaml', 'status': 'modified', 'Loc': {'(None, None, None)': {'mod': [34]}}}, {'path': 'autogpt/plugins.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [3, 5]}, "(None, 'scan_plugins', 203)": {'add': [219]}}}, {'path': 'scripts/install_plugin_deps.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [4, 32]}, "(None, 'install_plugin_dependencies', 8)": {'add': [18]}}}, {'path': 'tests/integration/test_plugins.py', 'status': 'modified', 'Loc': {"('MockConfig', 'mock_config_openai_plugin', 37)": {'mod': [42]}, "('MockConfig', 'mock_config_generic_plugin', 59)": {'mod': [63]}, "(None, 'test_scan_plugins_generic', 68)": {'mod': [71]}}}, {'path': 'tests/integration/test_web_selenium.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [0, 4, 6]}}}]}


Agent stuck in the "starting task" step--Unsupported Protocol

<!-- You MUST fill out this template. We will close issues that don't include enough information to reproduce -->
#### Describe the bug
<!-- a short description of the problem -->
I asked the agent to build a calculator, but it didn't give me any response, just stuck in the starting step.

#### Setup and configuration
**Current version**:
<!-- run `git log -n 1` to see this -->
```bash
commit e9121b78fed0b5ef36718ca0bf59588c0b094b86 (HEAD -> main)
Author: Xingyao Wang <xingyao6@illinois.edu>
Date:   Sun Apr 7 16:07:59 2024 +0800
```

<!-- tell us everything about your environment -->
**My config.toml and environment vars** (be sure to redact API keys):
```toml
LLM_MODEL="gpt-3.5-turbo-1106"
LLM_API_KEY="already set, and have test in python script, which works"
LLM_EMBEDDING_MODEL="openai"
WORKSPACE_DIR="./workspace"
```

**My model and agent** (you can see these settings in the UI):
* Model: PlannerAgent
* Agent: gpt-3.5-turbo-1106

**Commands I ran to install and run OpenDevin**:
```
make build
make run
```

**Steps to Reproduce**:
run the commands, input: build a calculator with python

**Logs, error messages, and screenshots**:
![image](https://github.com/OpenDevin/OpenDevin/assets/86202027/b078b7b0-446d-4e9d-bc83-ff3c270d9512)
backend:
```
INFO:     127.0.0.1:34564 - "GET /litellm-agents HTTP/1.1" 200 OK
INFO:     127.0.0.1:34572 - "GET /messages/total HTTP/1.1" 200 OK
INFO:     127.0.0.1:34584 - "DELETE /messages HTTP/1.1" 200 OK

==============
STEP 0

PLAN:
build a calculator with python

INFO:
HINT:
You're not currently working on any tasks. Your next action MUST be to mark a task as in_progress.
```

frontend:
```
22:35:39 - opendevin:INFO: sandbox.py:117 - Using workspace directory: /mnt/d/OpenDevin/workspace
22:35:39 - opendevin:INFO: sandbox.py:257 - Container stopped
22:35:39 - opendevin:INFO: sandbox.py:277 - Container started
22:37:54 - opendevin:INFO: sandbox.py:117 - Using workspace directory: /mnt/d/OpenDevin/workspace
```

llm prompt_001:
```
[{'content': '\n# Task\nYou\'re a diligent software engineer AI. You can\'t see, draw, or interact with a\nbrowser, but you can read and write files, and you can run commands, and you can think.\n\nYou\'ve been given the following task:\n\nbuild a calculator with python\n\n## Plan\nAs you complete this task, you\'re building a plan and keeping\ntrack of your progress. Here\'s a JSON representation of your plan:\n\n{\n  "id": "0",\n  "goal": "build a calculator with python",\n  "state": "open",\n  "subtasks": []\n}\n\n\nYou\'re not currently working on any tasks. Your next action MUST be to mark a task as in_progress.\n\nYou\'re responsible for managing this plan and the status of tasks in\nit, by using the `add_task` and `modify_task` actions described below.\n\nIf the History below contradicts the state of any of these tasks, you\nMUST modify the task using the `modify_task` action described below.\n\nBe sure NOT to duplicate any tasks. Do NOT use the `add_task` action for\na task that\'s already represented. Every task must be represented only once.\n\nTasks that are sequential MUST be siblings. They must be added in order\nto their parent task.\n\nIf you mark a task as \'completed\', \'verified\', or \'abandoned\',\nall non-abandoned subtasks will be marked the same way.\nSo before closing a task this way, you MUST not only be sure that it has\nbeen completed successfully--you must ALSO be sure that all its subtasks\nare ready to be marked the same way.\n\nIf, and only if, ALL tasks have already been marked verified,\nyou MUST respond with the `finish` action.\n\n## History\nHere is a recent history of actions you\'ve taken in service of this plan,\nas well as observations you\'ve made. This only includes the MOST RECENT\nten actions--more happened before that.\n\n[]\n\n\nYour most recent action is at the bottom of that history.\n\n## Action\nWhat is your next thought or action? Your response must be in JSON format.\n\nIt must be an object, and it must contain two fields:\n* `action`, which is one of the actions below\n* `args`, which is a map of key-value pairs, specifying the arguments for that action\n\n* `read` - reads the content of a file. Arguments:\n  * `path` - the path of the file to read\n* `write` - writes the content to a file. Arguments:\n  * `path` - the path of the file to write\n  * `content` - the content to write to the file\n* `run` - runs a command on the command line in a Linux shell. Arguments:\n  * `command` - the command to run\n  * `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won\'t be able to see the logs. You don\'t need to end the command with `&`, just set this to true.\n* `kill` - kills a background command\n  * `id` - the ID of the background command to kill\n* `browse` - opens a web page. Arguments:\n  * `url` - the URL to open\n* `think` - make a plan, set a goal, or record your thoughts. Arguments:\n  * `thought` - the thought to record\n* `add_task` - add a task to your plan. Arguments:\n  * `parent` - the ID of the parent task\n  * `goal` - the goal of the task\n  * `subtasks` - a list of subtasks, each of which is a map with a `goal` key.\n* `modify_task` - close a task. Arguments:\n  * `id` - the ID of the task to close\n  * `state` - set to \'in_progress\' to start the task, \'completed\' to finish it, \'verified\' to assert that it was successful, \'abandoned\' to give up on it permanently, or `open` to stop working on it for now.\n* `finish` - if ALL of your tasks and subtasks have been verified or abandoned, and you\'re absolutely certain that you\'ve completed your task and have tested your work, use the finish action to stop working.\n\nYou MUST take time to think in between read, write, run, browse, and recall actions.\nYou should never act twice in a row without thinking. But if your last several\nactions are all `think` actions, you should consider taking a different action.\n\nWhat is your next thought or action? Again, you must reply with JSON, and only with JSON.\n\nYou\'re not currently working on any tasks. Your next action MUST be to mark a task as in_progress.\n', 'role': 'user'}]
```

llm response is empty

#### Additional Context
I also tried to use gpt-4 and got the same result.

{'base_commit': '707ab7b3f84fb5664ff63da0b52e7b0d2e4df545', 'files': [{'path': 'opendevin/config.py', 'status': 'modified', 'Loc': {"(None, 'get_all', 78)": {'mod': [78, 82]}}}, {'path': 'opendevin/server/agent/manager.py', 'status': 'modified', 'Loc': {"('AgentManager', 'create_controller', 93)": {'mod': [107, 108, 109, 110, 111]}}}, {'path': 'opendevin/server/listen.py', 'status': 'modified', 'Loc': {"(None, 'read_default_model', 114)": {'mod': [115]}}}]}


* face_recognition version: 1.23
* Python version: 3.6.6
* Operating System: windows 10

### Description
![image](https://user-images.githubusercontent.com/2375460/56864177-e74b0900-69f1-11e9-9cad-d44cc8ca9d3d.png)

### What I Did

```
facerec_from_webcam_multiprocessing.py run Global is not defined. pls fix it, thanks
```


Doc for HDFStore compression unclear on what the default value of None does

The doc for the `HDFStore` class mentions:

```
complevel : int, 0-9, default None
            Specifies a compression level for data.
            A value of 0 disables compression.
```

That doesn't actually answer the question of what compression level is used when the default (None) is used, though. Is None translated further down to 0? it turns out yes, but you have to dig in the code to actually figure that out. And it could as well have been translated eventually to any other value.

Two options:
1. Actually change the default in the `complevel` argument to be "0". (It's an immutable object, so it's fine as a default value for a function argument.)
2. Just adjust the doc in some way.

When the right solution is decided, I can do a pull request with it. Thanks!

{'base_commit': 'dc86509b44b3fb0cd9a1a6d6ed564b082dc50848', 'files': [{'path': 'pandas/io/pytables.py', 'status': 'modified', 'Loc': {"('HDFStore', None, 401)": {'mod': [425]}}}]}


git push upstream branch does not exist, wrong command recommended first

<!-- If you have any issue with The Fuck, sorry about that, but we will do what we
can to fix that. Actually, maybe we already have, so first thing to do is to
update The Fuck and see if the bug is still there. -->

<!-- If it is (sorry again), check if the problem has not already been reported and
if not, just open an issue on [GitHub](https://github.com/nvbn/thefuck) with
the following basic information: -->

Recently I noticed a change in a `thefuck` behavior that I use very regularly which I wanted to call out as what I think is an unwanted change. This was introduced very recently, I believe with the 3.31 release. When using `git push` on a git repository where the branch does not exist in the upstream repository, `git` responds with a specific command one should run to create the upstream branch. Prior to version 3.31, `thefuck` seemed to recognize this and made the first suggested Corrected Command was the one `git` recommended. As of version 3.31, `thefuck` instead puts a generic `git push --no-verify` command first, and the one `git` recommended is instead the second result.

In this case where `git` recommends a specific command, `git push --no-verify` doesn't actually help or do what the user wants; you need the `git push --set-upstream origin branch-name` command which `thefuck` now arrives at second. Because of the inconvenience for this particular case, combined with the fact that the first option recommended by `thefuck` isn't functionally valid, the prior behavior is more correct for this particular case.

Below is all the debug information requested in the issue template:

The output of `thefuck --version` (something like `The Fuck 3.1 using Python
3.5.0 and Bash 4.4.12(1)-release`):

    The Fuck 3.31 using Python 3.9.5 and ZSH 5.8

Your system (Debian 7, ArchLinux, Windows, etc.):

    Arch Linux

How to reproduce the bug:

    - In a git repo, create a branch which does not exist in the upstream repository
    - Attempt to push the branch with `git push`
    - You should see an error message saying "fatal: The current branch branch-name has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin branch-name"
    - invoke `thefuck`
    - Prior to 3.31, `thefuck` would present as the first option the exact command which git tells you to use (git push --set-upstream origin branch-name).
    - As of 3.31, `thefuck` instead presents as the first option a more generic `git push --no-verify`, and git's recommended command is the second result.

The output of The Fuck with `THEFUCK_DEBUG=true` exported (typically execute `export THEFUCK_DEBUG=true` in your shell before The Fuck):

https://pastebin.com/qpyEcreC

If the bug only appears with a specific application, the output of that application and its version:

    git version 2.32.0

Anything else you think is relevant:

    N/A

<!-- It's only with enough information that we can do something to fix the problem. -->

{'base_commit': '0949d2e77022ad69cc07d4b25a858a7e023503ac', 'files': [{'path': 'thefuck/rules/git_hook_bypass.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'mod': [26]}}}]}


[Bug] 1.7.1 not support 1.6.0 script

Hello All,

My spider is created by scrapy 1.6.0.
These days, the scrapy updated to 1.7.1, and we found that it cannot support the code build by 1.6.0.

Here is the error:
```
Traceback (most recent call last):
  File "/usr/bin/scrapy", line 6, in <module>
    from scrapy.cmdline import execute
  File "/usr/lib64/python2.7/site-packages/scrapy/cmdline.py", line 10, in <module>
    from scrapy.crawler import CrawlerProcess
  File "/usr/lib64/python2.7/site-packages/scrapy/crawler.py", line 11, in <module>
    from scrapy.core.engine import ExecutionEngine
  File "/usr/lib64/python2.7/site-packages/scrapy/core/engine.py", line 14, in <module>
    from scrapy.core.scraper import Scraper
  File "/usr/lib64/python2.7/site-packages/scrapy/core/scraper.py", line 18, in <module>
    from scrapy.core.spidermw import SpiderMiddlewareManager
  File "/usr/lib64/python2.7/site-packages/scrapy/core/spidermw.py", line 13, in <module>
    from scrapy.utils.conf import build_component_list
  File "/usr/lib64/python2.7/site-packages/scrapy/utils/conf.py", line 4, in <module>
    import configparser
ImportError: No module named configparser
```

Would you please take time to check the issue?

Appreciate for your help in advance.

Thank you.


[Bug]: Browsing is not working

### Is there an existing issue for the same bug?

- [X] I have checked the troubleshooting document at https://github.com/OpenDevin/OpenDevin/blob/main/docs/guides/Troubleshooting.md
- [X] I have checked the existing issues.

### Describe the bug

When I ask a question that requires browsing the web to get the answer, OpenDevin does not use the "browsing" tab.

For instance, I asked
```
Please resolve this pull request: https://github.com/OpenDevin/OpenDevin/issues/1275
```

In trying to resolve the pull request, OpenDevin tried to install Playwright to browse the web instead of using built-in browsing capability, and the browsing tab said "no screenshot available".

### Current Version

```bash
`ghcr.io/opendevin/opendevin:0.3.1`
```

### Installation and Configuration

```bash
export LLM_API_KEY="sk-..."
export WORKSPACE_DIR=$(pwd)/workspace
```

### Model and Agent

_No response_

### Reproduction Steps

1. Ask OpenDevin: `Please resolve this pull request: https://github.com/OpenDevin/OpenDevin/issues/1275`

### Logs, Errors, Screenshots, and Additional Context

It seems that this is a relevant error:

```
STEP 2

23:12:20 - opendevin:INFO: agent_controller.py:89
PLAN
Resolve this pull request: https://github.com/OpenDevin/OpenDevin/issues/1275
23:12:26 - opendevin:INFO: agent_controller.py:107
ACTION
BrowseURLAction(url='https://github.com/OpenDevin/OpenDevin/pull/1275', action=<ActionType.BROWSE: 'browse'>)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
        - Avoid using `tokenizers` before the fork if possible
        - Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
23:12:27 - opendevin:INFO: agent_controller.py:160
OBSERVATION
BrowserType.launch: Executable doesn't exist at /root/.cache/ms-playwright/chromium-1112/chrome-linux/chrome
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated.       ║
║ Please run the following command to download new browsers: ║
║                                                            ║
║     playwright install                                     ║
║                                                            ║
║ <3 Playwright Team                                         ║
╚════════════════════════════════════════════════════════════╝
```

{'base_commit': '454e9613b0b4c7a9dbb2b8273aff0b36c4d8a2bb', 'files': [{'path': 'containers/app/Dockerfile', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [50]}}}]}


Nesting FastAPI instances doesn't work very well

Do this:

    main_app = FastAPI()
    sub_api = FastAPI()

    ...
    main_app.router.routes.append(Mount('/subapi', app=sub_api))

`sub_api` will correctly serve ever `/subapi` -- docs, methods, all that. However, the docs will still look for `/openapi.json` (absolute link) when trying to load the openapi spec. Additionally, the spec will not be adjusted to have the correct links, relative to where the module is mounted.

Perhaps this is a corner use case, but a lot of apps might have different collections of routes mounted in different subpaths.


type: bug
status: triage needed
aws:cloudformation
aws:iam

bug: AWS::NoValue produces error when used in IAM policy template

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Current Behavior

When I try to create a role with S3 resource and I use `!Ref AWS::NoValue` for its resource, it fails with errors. It is supposed to be removed from array entry, but it looks like it evaluates as `__aws_no_value__`, which then fails to validate because the value is not in acceptable format for ARN.
(Message: `Resource __aws_no_value__ must be in ARN format or "*".`)

template file `test.template` :
```
AWSTemplateFormatVersion: 2010-09-09

Conditions:
  someCondition: false

Resources:
  SomeRole:
    Type: AWS::IAM::Role
    Properties:
      RoleName: SomeRole
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - lambda.amazonaws.com
            Action:
              - sts:AssumeRole
      Policies:
        - PolicyName: SomePolicy
          PolicyDocument:
            Version: 2012-10-17
            Statement:
              - Effect: Allow
                Action:
                  - s3:GetObject
                  - s3:GetObjectVersion
                Resource:
                  - arn:aws:s3:::some-prefix-*/*
                  - !If
                    - someCondition
                    - !Ref arn:aws:s3:::another-prefix-*/*
                    - !Ref AWS::NoValue
```
Executed command:
```
awslocal cloudformation deploy \
  --no-fail-on-empty-changeset \
  --capabilities CAPABILITY_NAMED_IAM \
  --template-file test.template \
  --stack-name "test-stack"
```
Error log produced:
```
2021-08-30T07:38:54:DEBUG:localstack.utils.cloudformation.template_deployer: Error applying changes for CloudFormation stack "test-resources-iam": An error occurred (MalformedPolicyDocument) when calling the PutRolePolicy operation: Resource __aws_no_value__ must be in ARN format or "*". Traceback (most recent call last):
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 2083, in _run
    self.do_apply_changes_in_loop(changes, stack, stack_name)
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 2154, in do_apply_changes_in_loop
    self.apply_change(change, stack, new_resources, stack_name=stack_name)
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 2218, in apply_change
    result = deploy_resource(resource_id, new_resources, stack_name)
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1037, in deploy_resource
    return execute_resource_action(resource_id, resources, stack_name, ACTION_CREATE)
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1152, in execute_resource_action
    resource_id, resources, resource_type, func, stack_name, action_name
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1314, in configure_resource_via_sdk
    run_post_create_actions(action_name, resource_id, resources, resource_type, stack_name, result)
  File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1414, in run_post_create_actions
    PolicyDocument=doc,
  File "/opt/code/localstack/.venv/lib/python3.7/site-packages/botocore/client.py", line 386, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/opt/code/localstack/.venv/lib/python3.7/site-packages/botocore/client.py", line 705, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.MalformedPolicyDocumentException: An error occurred (MalformedPolicyDocument) when calling the PutRolePolicy operation: Resource __aws_no_value__ must be in ARN format or "*".
```

### Expected Behavior

Create stack without failing

### How are you starting LocalStack?

With the `localstack` script

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

```
FORCE_NONINTERACTIVE=1 \
SERVICES=iam,s3,lambda,cloudformation \
localstack infra start &
```

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

```
awslocal cloudformation deploy \
  --no-fail-on-empty-changeset \
  --capabilities CAPABILITY_NAMED_IAM \
  --template-file test.template \
  --stack-name "test-stack"
```

### Environment

```markdown
- OS:  Ubuntu 20.04
- LocalStack: latest
```

### Anything else?

_No response_

{'base_commit': '9f1b9dbf60f406e8d6205402b8ac078195cd0c01', 'files': [{'path': 'localstack/services/cloudformation/models/cloudwatch.py', 'status': 'modified', 'Loc': {"('CloudWatchAlarm', None, 6)": {'add': [11]}}}, {'path': 'localstack/services/cloudformation/models/iam.py', 'status': 'modified', 'Loc': {"('IAMRole', '_post_create', 278)": {'add': [314]}, "('IAMManagedPolicy', '_create', 46)": {'mod': [51]}}}, {'path': 'tests/integration/cloudformation/test_cloudformation_iam.py', 'status': 'modified', 'Loc': {"(None, 'test_iam_user_access_key', 156)": {'add': [174]}, '(None, None, None)': {'mod': [4, 8, 10, 13, 14, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]}, "(None, 'test_delete_role_detaches_role_policy', 18)": {'mod': [29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 42, 43, 45, 46, 47, 48, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 78, 79, 80]}, "(None, 'test_policy_attachments', 83)": {'mod': [110]}}}, {'path': 'tests/integration/cloudformation/test_cloudformation_iam.snapshot.json', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [19]}}}, {'path': 'tests/integration/templates/iam_policy_attachments.yaml', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [4], 'mod': [18]}}}, {'path': 'tests/integration/templates/iam_role_policy.yaml', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [0], 'mod': [12, 19, 20]}}}]}


GPT Engineer will not save individual files when given specs that result in many files.

The generated code goes into the logfile however it would be more useful if the tool could make all those files automatically.


Switch to the latest sphinx

The docs fail to build with the current Sphinx (7.2.6):

```
reading sources... [ 48%] topics/downloader-middleware
Extension error (scrapydocs):
Handler <function collect_scrapy_settings_refs at 0x7f81fc663a60> for event 'doctree-read' threw an exception (exception: Next node is not a target)
```

So we should update deps in docs/requirements.txt, fix this (and maybe others) problem and make sure the docs are built correctly.

{'base_commit': '40e623b2768598e36c4f367bd166b36fffceb3f6', 'files': [{'path': 'docs/requirements.txt', 'status': 'modified', 'Loc': {'(None, None, None)': {'mod': [1, 2, 3, 4]}}}]}


ReadTimeout when using local LLM

**Bug description**
When hosting the following model; https://huggingface.co/oobabooga/CodeBooga-34B-v0.1 locally using LMStudio 0.2.14 on Linux Mint 21.3 Cinnamon I am sometimes (usually after several iterations when the context gets large) confronted with a ReadTimeout.

MetaGPT main branch, commit id: adb42f4, it reports version: 0.7.4 with pip show metagpt. Used Python 3.9.18.

I used the following code to try out MetaGPT
```
import asyncio
from metagpt.roles.di.data_interpreter import DataInterpreter

async def main(requirement: str = ""):
    di = DataInterpreter()
    await di.run(requirement)

if __name__ == "__main__":
    requirement = "Create a dnd 5th edition graph displaying xp per level based on information from a reputable source determined by Googling. First write results in a CSV and validate the CSV contains multiple records. If the file does not contain records, determine if you can fix the code or whether you need to look at another source. After the CSV files is filled with records, create the graph based on this."

    asyncio.run(main(requirement))
```
I got the below exception
```
Traceback (most recent call last):
  File "metagpt/lib/python3.9/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions
    yield
  File "metagpt/lib/python3.9/site-packages/httpx/_transports/default.py", line 254, in __aiter__
    async for part in self._httpcore_stream:
  File "metagpt/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 367, in __aiter__
    raise exc from None
  File "metagpt/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 363, in __aiter__
    async for part in self._stream:
  File "metagpt/lib/python3.9/site-packages/httpcore/_async/http11.py", line 349, in __aiter__
    raise exc
  File "metagpt/lib/python3.9/site-packages/httpcore/_async/http11.py", line 341, in __aiter__
    async for chunk in self._connection._receive_response_body(**kwargs):
  File "metagpt/lib/python3.9/site-packages/httpcore/_async/http11.py", line 210, in _receive_response_body
    event = await self._receive_event(timeout=timeout)
  File "metagpt/lib/python3.9/site-packages/httpcore/_async/http11.py", line 224, in _receive_event
    data = await self._network_stream.read(
  File "metagpt/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 36, in read
    return b""
  File "3.9.18/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "metagpt/lib/python3.9/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ReadTimeout
```
**Bug solved method**

It would be nice if the timeout and retries are configurable to avoid this issue (for example like AutoGen does this in the LLM API configuration). N.b. I've tried larger local models in the past (for which disk swapping was required due to memory constraints). Those models can sometimes take more than an hour to respond. The model for which this bug is registered can fit in my CPU RAM (64Gb).

{'base_commit': '0958cc333ee13d1ce5216ae0bdeaa53b5eacc6ea', 'files': [{'path': 'config/config2.example.yaml', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [6]}}}, {'path': 'metagpt/actions/action_node.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [19]}, "('ActionNode', '_aask_v1', 411)": {'mod': [419]}, "('ActionNode', None, 122)": {'mod': [451]}, "('ActionNode', 'fill', 468)": {'mod': [476]}}}, {'path': 'metagpt/configs/llm_config.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [12]}, "('LLMConfig', 'check_llm_key', 87)": {'add': [90]}, "('LLMConfig', None, 38)": {'mod': [77]}}}, {'path': 'metagpt/const.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [134], 'mod': [126]}}}, {'path': 'metagpt/provider/anthropic_api.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [7]}, "('AnthropicLLM', None, 14)": {'mod': [44, 49, 50, 52]}}}, {'path': 'metagpt/provider/base_llm.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [25]}, "('BaseLLM', 'with_model', 257)": {'add': [260]}, "('BaseLLM', 'aask', 127)": {'mod': [133, 149]}, "('BaseLLM', None, 32)": {'mod': [155, 165, 169, 173, 184, 194]}, "('BaseLLM', 'aask_batch', 155)": {'mod': [161]}, "('BaseLLM', 'acompletion_text', 194)": {'mod': [197, 198]}}}, {'path': 'metagpt/provider/dashscope_api.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [27]}, "('DashScopeLLM', None, 152)": {'mod': [205, 211, 212, 214]}}}, {'path': 'metagpt/provider/general_api_base.py', 'status': 'modified', 'Loc': {"('APIRequestor', 'arequest_raw', 556)": {'mod': [576]}}}, {'path': 'metagpt/provider/google_gemini_api.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [18]}, "('GeminiLLM', None, 41)": {'mod': [126, 132, 133, 135]}}}, {'path': 'metagpt/provider/human_provider.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [8]}, "('HumanProvider', None, 13)": {'mod': [21, 38, 41, 45, 48]}, "('HumanProvider', 'aask', 28)": {'mod': [34, 36]}}}, {'path': 'metagpt/provider/ollama_api.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'mod': [8]}, "('OllamaLLM', None, 17)": {'mod': [53, 65, 66, 68]}, "('OllamaLLM', '_achat_completion', 53)": {'mod': [58]}, "('OllamaLLM', '_achat_completion_stream', 68)": {'mod': [74]}}}, {'path': 'metagpt/provider/openai_api.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [27]}, "('OpenAILLM', None, 43)": {'mod': [77, 107, 121, 122, 127, 128, 137, 154]}, "('OpenAILLM', '_achat_completion_stream', 77)": {'mod': [79]}, "('OpenAILLM', '_cons_kwargs', 107)": {'mod': [115]}, "('OpenAILLM', 'acompletion_text', 137)": {'mod': [142]}, "('OpenAILLM', '_achat_completion_function', 145)": {'mod': [146, 149]}}}, {'path': 'metagpt/provider/qianfan_api.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [11]}, "('QianFanLLM', None, 23)": {'mod': [110, 115, 116, 118]}}}, {'path': 'metagpt/provider/spark_api.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [19]}, "('SparkLLM', None, 26)": {'mod': [34, 37, 43, 46]}}}, {'path': 'metagpt/provider/zhipuai_api.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [10]}, "('ZhiPuAILLM', None, 26)": {'mod': [48, 54, 60, 61, 63]}}}, {'path': 'requirements.txt', 'status': 'modified', 'Loc': {'(None, None, None)': {'mod': [37]}}}]}


[BUG] printing -\n- in rich.progress context manager will kill the jupyter.

try this code in the jupyter notebook:

```python
from rich.progress import Progress
with Progress() as progress:
    print("-\n-")
print("finished")
```
and it will show a popup message displaying that the kernel has died.
I have tested it on google colab and mint.

also, I have installed rich using
```
pip install rich[jupyter]
```

{'base_commit': 'b5f0b743a7f50c72199eb792cd6e70730b60651f', 'files': [{'path': 'CHANGELOG.md', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [18]}}}, {'path': 'rich/file_proxy.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'mod': [2]}, "('FileProxy', 'flush', 50)": {'mod': [51, 52, 53, 54]}}}, {'path': 'tests/test_file_proxy.py', 'status': 'modified', 'Loc': {"(None, 'test_flush', 20)": {'add': [27]}}}]}


using sparse matrix in fit_params

When the value of a fit_params is sparse matrix, it will raise error from the following code.
sklearn/cross_validation.py

```
1224                       if hasattr(v, '__len__') and len(v) == n_samples else v)
1225                       for k, v in fit_params.items()])
```

It is because the `__len__` of sparse matrix is defined as
scipy/sparse/base.py

```
190    def __len__(self):
191        # return self.getnnz()
192        raise TypeError("sparse matrix length is ambiguous; use getnnz()"
193                         " or shape[0]")
```

Is there anyway to circumpass this issue. I do not want to convert the sparse matrix into a dense one, since it will consume a big memory.


SVC and OneVsOneClassifier decision_function inconsistent on sub-sample

Hi,

I'm seeing inconsistent numerical results with SVC's decision_function.
When estimated over an entire batch of samples ( (n_samples, n_features) matrix ) compared to analyzing sample-by-sample, the results are not the same.
This is true for both the individual numerical values per sample and the overall distribution of the results.

**The model is SVC with RBF kernel, for a 3-class classification:**
```
SVC(C=1.0, gamma=0.007, class_weight = new_class_weight, probability = True, random_state = 30,
decision_function_shape = 'ovr')
```

**The models are loaded from file:**

`ML = joblib.load("model.pkl")`

**Option A, analyze a matrix:**

`distances = ML.decision_function(X)`

**Option B, analyze individual samples:**
```
distances = numpy.zeros([X.shape[0], 3])
for i in range(X.shape[0]):
    distances[i,:]` = ML.decision_function(X[i,:].reshape(1,-1))
```

**Output for first two samples:**
**Option A:**
sample 1: [ 0.90835588, -0.17305875,  2.26470288]
sample 2: [ 1.10437313, -0.2371539 ,  2.13278077]

**Option B:**
sample 1: [ 0.82689247, -0.32689247,  2.5       ]
sample 2: [ 1.22005359, -0.5       ,  2.27994641]

I couldn't find any indication for this behavior in the documentation.

Windows-10-10.0.15063-SP0
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul  5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
NumPy 1.12.1
SciPy 0.18.1
Scikit-Learn 0.18.1

Thanks!

{'base_commit': 'adc1e590d4dc1e230b49a4c10b4cd7b672bb3d69', 'files': [{'path': 'doc/modules/multiclass.rst', 'status': 'modified', 'Loc': {'(None, None, 230)': {'mod': [230]}}}, {'path': 'doc/modules/svm.rst', 'status': 'modified', 'Loc': {'(None, None, 116)': {'mod': [116]}, '(None, None, 118)': {'mod': [118]}}}, {'path': 'doc/whats_new/v0.21.rst', 'status': 'modified', 'Loc': {'(None, None, 26)': {'add': [26]}, '(None, None, 353)': {'add': [353]}}}, {'path': 'sklearn/svm/base.py', 'status': 'modified', 'Loc': {"('BaseSVC', 'decision_function', 527)": {'add': [549]}}}, {'path': 'sklearn/utils/estimator_checks.py', 'status': 'modified', 'Loc': {"(None, 'check_methods_subset_invariance', 815)": {'mod': [839, 840]}}}, {'path': 'sklearn/utils/multiclass.py', 'status': 'modified', 'Loc': {"(None, '_ovr_decision_function', 402)": {'mod': [434, 435, 437, 438, 440, 444, 445, 446, 447]}}}, {'path': 'sklearn/utils/tests/test_multiclass.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [18, 25]}, "(None, 'test_safe_split_with_precomputed_kernel', 361)": {'add': [380]}}}]}


allow spiders to return dicts instead of Items

In many cases the requirement to define and yield Items from a spider is an unnecessary complication.

An example from Scrapy tutorial:

```
import scrapy

class DmozItem(scrapy.Item):
    title = scrapy.Field()
    link = scrapy.Field()
    desc = scrapy.Field()

class DmozSpider(scrapy.Spider):
    name = "dmoz"
    allowed_domains = ["dmoz.org"]
    start_urls = [
        "http://www.dmoz.org/Computers/Programming/Languages/Python/Books/",
        "http://www.dmoz.org/Computers/Programming/Languages/Python/Resources/"
    ]

    def parse(self, response):
        for sel in response.xpath('//ul/li'):
            item = DmozItem()
            item['title'] = sel.xpath('a/text()').extract()
            item['link'] = sel.xpath('a/@href').extract()
            item['desc'] = sel.xpath('text()').extract()
            yield item
```

It can be made simpler with dicts instead of Items:

```
import scrapy

class DmozSpider(scrapy.Spider):
    name = "dmoz"
    allowed_domains = ["dmoz.org"]
    start_urls = [
        "http://www.dmoz.org/Computers/Programming/Languages/Python/Books/",
        "http://www.dmoz.org/Computers/Programming/Languages/Python/Resources/"
    ]

    def parse(self, response):
        for sel in response.xpath('//ul/li'):
            yield {
                'title': sel.xpath('a/text()').extract(),
                'link': sel.xpath('a/@href').extract(),
                'desc': sel.xpath('text()').extract(),
            }
```

The version with dicts gives a developer less concepts to learn, and it is easier to explain.

When field metadata is not used and data is exported to JSON/XML yielding Python dicts should be enough. Even when you export to CSV dicts could be enough - columns can be set explicitly by an user.

This should also prevent tickets like https://github.com/scrapy/scrapy/issues/968.


Duplicated input points silently create duplicated clusters in KMeans

#### Description
When there are duplicated input points to Kmeans resulting to number of unique points < number of requested clusters, there is no error thrown. Instead, clustering continues to (seemingly) produce the number of clusters requested, but some of them are exactly the same, so the cluster labels produced for the input points do not go all the way to number of requested clusters.

#### Steps/Code to Reproduce
```python
from sklearn.cluster import KMeans
import numpy as np

# some input points here are identical, so that n_total=17, n_unique=9
x2d = np.array([(1086, 348), (1087, 347), (1190, 244), (1190, 244), (1086, 348), (1185, 249), (1193, 241), (1185, 249), (1087, 347), (1188, 247), (1187, 233), (26, 111), (26, 111), (26, 110), (26, 110), (26, 110), (26, 110)])
kmeans = KMeans(n_clusters=10) # n_clusters > n_unique
c_labels = kmeans.fit_predict(x2d)
c_centers = kmeans.cluster_centers_
```
#### Expected Results
Either an error thrown, or the cluster labels produced should match the unique clusters only (i.e. no identical cluster centres)

#### Actual Results
```python
>>> c_labels  # note there's no entry for cluster 9
array([7, 2, 6, 6, 7, 5, 4, 5, 2, 1, 3, 8, 8, 0, 0, 0, 0], dtype=int32)
>>> c_centers # two of these 10 clusters have identical centers, so only 9 of them are unique
array([[   26.,   110.],
       [ 1188.,   247.],
       [ 1087.,   347.],
       [ 1187.,   233.],
       [ 1193.,   241.],
       [ 1185.,   249.],
       [ 1190.,   244.],
       [ 1086.,   348.],
       [   26.,   111.],
       [   26.,   110.]])
```

#### Versions
```python
Darwin-16.7.0-x86_64-i386-64bit
Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:04:09)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
NumPy 1.13.1
SciPy 0.19.1
Scikit-Learn 0.18.2
```

{'base_commit': 'effd75dda5f4afa61f988035ff8fe4b3a447464e', 'files': [{'path': 'doc/whats_new/v0.20.rst', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [136]}}}, {'path': 'sklearn/cluster/k_means_.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [34]}, "(None, 'k_means', 167)": {'add': [376]}}}, {'path': 'sklearn/cluster/tests/test_k_means.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [17, 20]}, "(None, 'test_sparse_validate_centers', 855)": {'add': [869]}}}]}


is_generator_with_return_value raises IndentationError with a flush left doc string

### Description

Code that is accepted by the python interpreter raises when fed through `textwrap.dedent`

### Steps to Reproduce

1. Create `is_generator_bug.py` with the content below (which I simplified from [the `is_generator_with_return_value` method body](https://github.com/scrapy/scrapy/blob/2.0.1/scrapy/utils/misc.py#L186-L187)
2. Run `python is_generator_bug.py`
3. Observe the kaboom

```python
import ast
import inspect
from textwrap import dedent
class Bob:
    def doit(self):
        """
this line is flush left
        """
        if True:
            yield 1234

if __name__ == '__main__':
    b = Bob()
    c = b.doit
    if inspect.isgeneratorfunction(c):
        tree = ast.parse(dedent(inspect.getsource(c)))
```

**Expected behavior:** [What you expect to happen]

No Error

**Actual behavior:** [What actually happens]

```console
$ python3.7 is_generator_bug.py
Traceback (most recent call last):
  File "is_generator_bug.py", line 16, in <module>
    tree = ast.parse(dedent(inspect.getsource(c)))
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 1
    def doit(self):
    ^
IndentationError: unexpected indent
```

**Reproduces how often:** [What percentage of the time does it reproduce?]

100%

### Versions

```
Scrapy       : 2.0.1
lxml         : 4.5.0.0
libxml2      : 2.9.10
cssselect    : 1.1.0
parsel       : 1.5.2
w3lib        : 1.21.0
Twisted      : 20.3.0
Python       : 3.7.7 (default, Mar 11 2020, 23:30:22) - [Clang 10.0.0 (clang-1000.11.45.5)]
pyOpenSSL    : 19.1.0 (OpenSSL 1.1.1d  10 Sep 2019)
cryptography : 2.8
Platform     : Darwin-17.7.0-x86_64-i386-64bit
```

### Additional context

{'base_commit': '0dad0fce72266aa7b38b536f87bab26e7f233c74', 'files': [{'path': 'scrapy/utils/misc.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'mod': [12]}, "(None, 'is_generator_with_return_value', 217)": {'mod': [230]}, "(None, 'warn_on_generator_with_return_value', 240)": {'mod': [245, 247, 248, 249, 250, 251]}}}, {'path': 'tests/test_utils_misc/test_return_with_argument_inside_generator.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [1], 'mod': [3]}, "('UtilsMiscPy3TestCase', None, 6)": {'mod': [8, 9]}, "('UtilsMiscPy3TestCase', 'test_generators_with_return_statements', 8)": {'mod': [13, 17, 21, 25, 28, 32, 40, 41, 43, 44, 49, 50, 51, 52, 53, 54, 55, 56]}, "('UtilsMiscPy3TestCase', 'g', 13)": {'mod': [15]}, "('UtilsMiscPy3TestCase', 'k', 28)": {'mod': [30]}, "('UtilsMiscPy3TestCase', 'n', 40)": {'mod': [46, 47]}}}]}


Something goes wrong with KernelPCA with 32 bits input data

When given 32 bits input, KernelPCA succeed to transform the data into a 17-dimensional feature space while the original space was 3 features. I did not debug yet but this seems really unlikely.

```python
# %%
from sklearn.datasets import make_blobs
from sklearn.preprocessing import StandardScaler

X, y = make_blobs(
    n_samples=30,
    centers=[[0, 0, 0], [1, 1, 1]],
    random_state=0,
    cluster_std=0.1
)
X = StandardScaler().fit_transform(X)
X -= X.min()

# %%
import numpy as np
from sklearn.decomposition import KernelPCA

kpca = KernelPCA()
print(kpca.fit_transform(X).shape)
print(kpca.fit_transform(X.astype(np.float32)).shape)
```

{'base_commit': 'e217b68fd00bb7c54b81a492ee6f9db6498517fa', 'files': [{'path': 'doc/whats_new/v0.24.rst', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [118], 'mod': [25, 26]}}}, {'path': 'sklearn/decomposition/tests/test_kernel_pca.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [12]}, "(None, 'test_kernel_pca_inverse_transform', 290)": {'add': [297]}}}, {'path': 'sklearn/utils/validation.py', 'status': 'modified', 'Loc': {"(None, '_check_psd_eigenvalues', 1093)": {'mod': [1186]}}}]}


S3 object metadata not saved when uploaded with presigned url

Use case:
I'm enabling users to directly upload to s3 using presigned url. S3 is configured to add event to SQS on Put. Queue consumer, reads the queue and makes HEAD requests with object keys to get the metadata and save information to database (generic image upload, so I know where to add file).

Test script in node js - some ugly code here (to install deps run `npm install aws-sdk request`):
```js
const AWS = require("aws-sdk");
const request = require("request");

let s3 = new AWS.S3({
    endpoint: "http://localhost:4572",
    s3ForcePathStyle: true,
    accessKeyId: "",
    secretAccessKey: "",
    region: "us-west-1"
});

var bucket = "bucketest";
var key = "test.txt";

s3.createBucket({Bucket: bucket}, function (err, data) {
    if (err) {
        console.error(err.message);
        // ignore, probably there is bucket already
    }

    var params = {
        Bucket: bucket,
        Key: key,
        Metadata: {
            venue: "123"
        }
    };

    s3.getSignedUrl('putObject', params, function (err, url) {
        if (err) {
            console.error('Presigning post data encountered an error', err);
        } else {
            console.log('==== URL: ', url);

            var body = new Buffer('Test data.');
            request.put({ url, body, method: "PUT" }, function(err, resp, body) {
                if (err) {
                    console.log('======= error:', error);
                    return;
                }

                console.log(body);

                s3.headObject({Bucket: bucket, Key: key}, function (err, data) {
                    if (err) console.log("====== error1:", err, err.stack);
                    else console.log("==== HEAD RESPONSE", data);
                });
            })
        }
    });
});
```

Output:
```
==== URL:  http://localhost:4572/heaps-test/test.txt?AWSAccessKeyId=somekey&Expires=1515503310&Signature=TgK3B33p2kwCWs5F5KtaZ3fxgXA%3D&x-amz-meta-venue=123
<PutObjectResponse xmlns="http://s3.amazonaws.com/doc/2006-03-01"><PutObjectResponse><ETag>"56dd8a439abf97fda051f88f09f00d65"</ETag><LastModified>2018-01-09T12:53:30.637Z</LastModified></PutObjectResponse></PutObjectResponse>
==== HEAD RESPONSE { LastModified: 2018-01-09T12:53:30.000Z,
  ContentLength: 10,
  ETag: '"56dd8a439abf97fda051f88f09f00d65"',
  ContentType: 'text/html; charset=utf-8',
  Metadata: {} }

```

Expected Output (tested with live AWS):
```
==== URL:  https://heaps-test.s3.eu-west-1.amazonaws.com/test.txt?AWSAccessKeyId=somekey&Expires=1515503234&Signature=enc17C6glTsVtOiGobugz5NELIc%3D&x-amz-meta-venue=123

==== HEAD RESPONSE { AcceptRanges: 'bytes',
  LastModified: 2018-01-09T12:52:15.000Z,
  ContentLength: 10,
  ETag: '"56dd8a439abf97fda051f88f09f00d65"',
  ContentType: 'binary/octet-stream',
  Metadata: { venue: '123' } }
```

As you can see Metadata is empty when using localstack

{'base_commit': '6c8f52d42563c1207a8cb3fbbfccb6d4af2a0670', 'files': [{'path': 'localstack/services/s3/s3_listener.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [44, 308]}, "('ProxyListenerS3', 'forward_request', 514)": {'add': [563]}, "('ProxyListenerS3', 'return_response', 595)": {'mod': [665]}}}, {'path': 'tests/integration/test_s3.py', 'status': 'modified', 'Loc': {"('S3ListenerTest', None, 30)": {'add': [187]}}}]}


This model's maximum context length is 8191 tokens, however you requested 89686 tokens (89686 in your prompt)

### Duplicates

- [X] I have searched the existing issues

### Steps to reproduce 🕹

The program is trying to process an absurd amount of information at once. It happens over and over again.

Adding chunk 17 / 20 to memory
SYSTEM:  Command browse_website returned: Error: This model's maximum context length is 8191 tokens, however you requested 89686 tokens (89686 in your prompt;
 0 for the completion). Please reduce your prompt; or completion length.

### Current behavior 😯

_No response_

### Expected behavior 🤔

_No response_

### Your prompt 📝

```yaml
# Paste your prompt here
```


stat documentation: mime_type vs mimetype, mime output vs descriptive output

<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and devel branch are affected too.
-->

##### ISSUE TYPE
 - Documentation Report

##### COMPONENT NAME
stat

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes below -->
```
ansible 2.4.3.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/oliver/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
```

##### CONFIGURATION
ansible.cfg:
```
[defaults]
inventory      = ./hosts
roles_path     = ./roles
remote_user    = oliver
nocows         = 1
vault_password_file = ./get_vault_password_from_keyring.py

gathering      = smart
fact_caching   = jsonfile
fact_caching_timeout = 21600
fact_caching_connection = ./cache

[privilege_escalation]
become = True
become_method = sudo

[ssh_connection]
pipelining = True
```

##### OS / ENVIRONMENT
Running Ansible on Ubuntu 16.04.4 x86_64; target is the same machine.

Tried with and without python-magic module installed, but didn't observe any different behaviour.

##### SUMMARY
<!--- Explain the problem briefly -->
Documentation for stat module (http://docs.ansible.com/ansible/latest/stat_module.html) mentions that a "mime_type" entry will be set if get_mime is set to true, with example content being "PDF document, version 1.2". I couldn't get this result; rather:
- a "mimetype" entry is set (ie. no underscore)
- the mimetype entry contains the actual mime type (eg. "application/pdf") rather than a description (eg. "PDF document, version 1.2")

##### STEPS TO REPRODUCE
```yaml
- name: Get mime type of test file
  stat: path="/home/oliver/mozilla.pdf"
  register: my_stat_check

- debug:
    msg: "{{ my_stat_check.stat.mimetype }}"

- debug:
    msg: "{{ my_stat_check.stat.mime_type }}"
```

##### EXPECTED RESULTS
I expected the first debug message to fail, and expected the second one to succeed and print "PDF document, version 1.2".

Alternatively, the documentation should state that "mimetype" will be set, and will contain the technical mime type rather than a description.
Though admittedly I'd prefer to also get the descriptive type output, since eg. for swap files the mime type is always "application/octet-stream" (so a swap file is indistinguishable from any other binary file); while the descriptive type is something like "Linux/i386 swap file (new style)" which is more useful.

##### ACTUAL RESULTS
At the moment, the first debug message will work and will print "application/pdf". The second debug message will fail with "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'mime_type'".

```
TASK [tools : Get mime type of test file] *****************************************************************************************************************************************************************************************************
ok: [myhost] => {"changed": false, "stat": {"atime": 1519571973.3959274, "attr_flags": "e", "attributes": ["extents"], "block_size": 4096, "blocks": 352, "charset": "binary", "checksum": "2d9eb9f17601726c56bd0c4fbc770430d0ac2277", "ctime": 1519484291.234419, "dev": 2098, "device_type": 0, "executable": false, "exists": true, "gid": 1000, "gr_name": "oliver", "inode": 12592144, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "md5": "760bf09b20afc699ad5cb4cabf3a151a", "mimetype": "application/pdf", "mode": "0664", "mtime": 1519484291.234419, "nlink": 1, "path": "/home/oliver/mozilla.pdf", "pw_name": "oliver", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 180168, "uid": 1000, "version": "18446744071694658390", "wgrp": true, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false}}

TASK [tools : debug] **************************************************************************************************************************************************************************************************************************
ok: [myhost] => {
    "msg": "application/pdf"
}

TASK [tools : debug] **************************************************************************************************************************************************************************************************************************
fatal: [myhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'mime_type'\n\nThe error appears to have been in '/home/oliver/devel/myhost/ansible/roles/tools/tasks/main.yml': line 40, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- debug:\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'mime_type'"}
	to retry, use: --limit @/home/oliver/devel/myhost/ansible/playbooks/desktop.retry
```

{'base_commit': '141d638e590897d4ec5371c4868f027dad95a38e', 'files': [{'path': 'lib/ansible/modules/files/stat.py', 'status': 'modified', 'Loc': {'(None, None, None)': {'mod': [318, 324]}}}]}


kindly adding some documentations on t5-v1_1-base""

## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->

- `transformers` version:
- Platform:
- Python version:
- PyTorch version (GPU?):
- Tensorflow version (GPU?):
- Using GPU in script?:
- Using distributed or parallel set-up in script?:

### Who can help
<!-- Your issue will be replied to more quickly if you can figure out the right person to tag with @
 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- albert, bert, xlm: @LysandreJik
- blenderbot, bart, marian, pegasus, encoderdecoder,  t5: @patrickvonplaten, @patil-suraj
- longformer, reformer, transfoxl, xlnet: @patrickvonplaten
- fsmt: @stas00
- funnel: @sgugger
- gpt2: @patrickvonplaten, @LysandreJik
- rag: @patrickvonplaten, @lhoestq
- tensorflow: @Rocketknight1

Library:

- benchmarks: @patrickvonplaten
- deepspeed: @stas00
- ray/raytune: @richardliaw, @amogkam
- text generation: @patrickvonplaten
- tokenizers: @LysandreJik
- trainer: @sgugger
- pipelines: @LysandreJik

Documentation: @sgugger

Model hub:

- for issues with a model report at https://discuss.huggingface.co/ and tag the model's creator.

HF projects:

- datasets: [different repo](https://github.com/huggingface/datasets)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Examples:

- maintained examples (not research project or legacy): @sgugger, @patil-suraj
- research_projects/bert-loses-patience: @JetRunner
- research_projects/distillation: @VictorSanh

 -->

Documentation: @sgugger
Hi
Could you kindly add some documentations on "t5-v1_1-base"? I tested one code with t5-base and t5-v1 version, for t5-v1 I got memory issue, this seems to me the model size is different and larger, also fast tokenizer for this model does not work, could you kindly add a documentation on these differences?

thanks a lot.


Correcting `app-install` to `apt-get install` rather than `install`

<!-- If you have any issue with The Fuck, sorry about that, but we will do what we
can to fix that. Actually, maybe we already have, so first thing to do is to
update The Fuck and see if the bug is still there. -->

<!-- If it is (sorry again), check if the problem has not already been reported and
if not, just open an issue on [GitHub](https://github.com/nvbn/thefuck) with
the following basic information: -->

The output of `thefuck --version` (something like `The Fuck 3.1 using Python
3.5.0 and Bash 4.4.12(1)-release`):

    The Fuck 3.29 using Python 3.6.8 and Bash 4.4.20(1)-release

Your system (Debian 7, ArchLinux, Windows, etc.):

    Ubuntu 18.04.3 LTS

How to reproduce the bug:

    ~$ sudo apt-install python
    fuck

The output of The Fuck with `THEFUCK_DEBUG=true` exported (typically execute `export THEFUCK_DEBUG=true` in your shell before The Fuck):

```
DEBUG: Run with settings: {'alter_history': True,
 'debug': True,
 'env': {'GIT_TRACE': '1', 'LANG': 'C', 'LC_ALL': 'C'},
 'exclude_rules': [],
 'history_limit': None,
 'instant_mode': False,
 'no_colors': False,
 'num_close_matches': 3,
 'priority': {},
 'repeat': False,
 'require_confirmation': True,
 'rules': [<const: All rules enabled>],
 'slow_commands': ['lein', 'react-native', 'gradle', './gradlew', 'vagrant'],
 'user_dir': PosixPath('/home/user/.config/thefuck'),
 'wait_command': 3,
 'wait_slow_command': 15}
DEBUG: Received output: sudo: apt-install: command not found

DEBUG: Call: sudo apt-install python; with env: {'CLUTTER_IM_MODULE': 'xim', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'XDG_MENU_PREFIX': 'gnome-', 'LANG': 'C', 'DISPLAY': ':0', 'GNOME_SHELL_SESSION_MODE': 'ubuntu', 'COLORTERM': 'truecolor', 'TF_SHELL_ALIASES': 'alias alert=\'notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e \'\\\'\'s/^\\s*[0-9]\\+\\s*//;s/[;&|]\\s*alert$//\'\\\'\')"\'\nalias egrep=\'egrep --color=auto\'\nalias fgrep=\'fgrep --color=auto\'\nalias grep=\'grep --color=auto\'\nalias l=\'ls -CF\'\nalias la=\'ls -A\'\nalias ll=\'ls -alF\'\nalias ls=\'ls --color=auto\'', 'DESKTOP_AUTOSTART_ID': '10e5aedf3552f69d7a157076635571365600000035090007', 'USERNAME': 'user', 'XDG_VTNR': '2', 'PYTHONIOENCODING': 'utf-8', 'SSH_AUTH_SOCK': '/run/user/1000/keyring/ssh', 'MANDATORY_PATH': '/usr/share/gconf/ubuntu.mandatory.path', 'XDG_SESSION_ID': '2', 'USER': 'user', 'DESKTOP_SESSION': 'ubuntu', 'QT4_IM_MODULE': 'xim', 'TEXTDOMAINDIR': '/usr/share/locale/', 'GNOME_TERMINAL_SCREEN': '/org/gnome/Terminal/screen/988562f2_716d_4bc1_9825_43d1608e1ccb', 'TF_SHELL': 'bash', 'DEFAULTS_PATH': '/usr/share/gconf/ubuntu.default.path', 'PWD': '/home/user', 'HOME': '/home/user', 'TEXTDOMAIN': 'im-config', 'SSH_AGENT_PID': '3588', 'QT_ACCESSIBILITY': '1', 'XDG_SESSION_TYPE': 'x11', 'XDG_DATA_DIRS': '/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop', 'XDG_SESSION_DESKTOP': 'ubuntu', 'GTK_MODULES': 'gail:atk-bridge', 'WINDOWPATH': '2', 'TERM': 'xterm-256color', 'SHELL': '/bin/bash', 'VTE_VERSION': '5202', 'QT_IM_MODULE': 'ibus', 'XMODIFIERS': '@im=ibus', 'IM_CONFIG_PHASE': '2', 'XDG_CURRENT_DESKTOP': 'ubuntu:GNOME', 'GPG_AGENT_INFO': '/run/user/1000/gnupg/S.gpg-agent:0:1', 'TF_ALIAS': 'fuck', 'GNOME_TERMINAL_SERVICE': ':1.82', 'XDG_SEAT': 'seat0', 'SHLVL': '1', 'LANGUAGE': 'en_IL:en', 'GDMSESSION': 'ubuntu', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'LOGNAME': 'user', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'XDG_RUNTIME_DIR': '/run/user/1000', 'XAUTHORITY': '/run/user/1000/gdm/Xauthority', 'TF_HISTORY': '\t apt-install brew\n\t apt-get install brew\n\t fuck\n\t sudo apt-install python\n\t sudo install python\n\t thefuck --version\n\t adb_release -a\n\t lsb_release -a\n\t export THEFUCK_DEBUG=true\n\t sudo apt-install python', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/etc/xdg', 'PATH': '/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'THEFUCK_DEBUG': 'true', 'SESSION_MANAGER': 'local/virt-lnx:@/tmp/.ICE-unix/3509,unix/virt-lnx:/tmp/.ICE-unix/3509', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'GTK_IM_MODULE': 'ibus', '_': '/usr/local/bin/thefuck', 'LC_ALL': 'C', 'GIT_TRACE': '1'}; is slow:  took: 0:00:00.008240
DEBUG: Importing rule: adb_unknown_command; took: 0:00:00.000389
DEBUG: Importing rule: ag_literal; took: 0:00:00.000628
DEBUG: Importing rule: apt_get; took: 0:00:00.014902
DEBUG: Importing rule: apt_get_search; took: 0:00:00.000415
DEBUG: Importing rule: apt_invalid_operation; took: 0:00:00.000915
DEBUG: Importing rule: apt_list_upgradable; took: 0:00:00.000459
DEBUG: Importing rule: apt_upgrade; took: 0:00:00.000436
DEBUG: Importing rule: aws_cli; took: 0:00:00.000384
DEBUG: Importing rule: az_cli; took: 0:00:00.000309
DEBUG: Importing rule: brew_cask_dependency; took: 0:00:00.000625
DEBUG: Importing rule: brew_install; took: 0:00:00.000120
DEBUG: Importing rule: brew_link; took: 0:00:00.000283
DEBUG: Importing rule: brew_reinstall; took: 0:00:00.000605
DEBUG: Importing rule: brew_uninstall; took: 0:00:00.000291
DEBUG: Importing rule: brew_unknown_command; took: 0:00:00.000142
DEBUG: Importing rule: brew_update_formula; took: 0:00:00.000292
DEBUG: Importing rule: brew_upgrade; took: 0:00:00.000112
DEBUG: Importing rule: cargo; took: 0:00:00.000098
DEBUG: Importing rule: cargo_no_command; took: 0:00:00.000292
DEBUG: Importing rule: cat_dir; took: 0:00:00.000322
DEBUG: Importing rule: cd_correction; took: 0:00:00.001288
DEBUG: Importing rule: cd_mkdir; took: 0:00:00.000479
DEBUG: Importing rule: cd_parent; took: 0:00:00.000114
DEBUG: Importing rule: chmod_x; took: 0:00:00.000108
DEBUG: Importing rule: composer_not_command; took: 0:00:00.000309
DEBUG: Importing rule: cp_omitting_directory; took: 0:00:00.000570
DEBUG: Importing rule: cpp11; took: 0:00:00.000311
DEBUG: Importing rule: dirty_untar; took: 0:00:00.001544
DEBUG: Importing rule: dirty_unzip; took: 0:00:00.001127
DEBUG: Importing rule: django_south_ghost; took: 0:00:00.000117
DEBUG: Importing rule: django_south_merge; took: 0:00:00.000106
DEBUG: Importing rule: dnf_no_such_command; took: 0:00:00.000930
DEBUG: Importing rule: docker_login; took: 0:00:00.000350
DEBUG: Importing rule: docker_not_command; took: 0:00:00.000597
DEBUG: Importing rule: dry; took: 0:00:00.000107
DEBUG: Importing rule: fab_command_not_found; took: 0:00:00.000416
DEBUG: Importing rule: fix_alt_space; took: 0:00:00.000284
DEBUG: Importing rule: fix_file; took: 0:00:00.003212
DEBUG: Importing rule: gem_unknown_command; took: 0:00:00.000493
DEBUG: Importing rule: git_add; took: 0:00:00.000547
DEBUG: Importing rule: git_add_force; took: 0:00:00.000371
DEBUG: Importing rule: git_bisect_usage; took: 0:00:00.000382
DEBUG: Importing rule: git_branch_delete; took: 0:00:00.000293
DEBUG: Importing rule: git_branch_exists; took: 0:00:00.000364
DEBUG: Importing rule: git_branch_list; took: 0:00:00.000304
DEBUG: Importing rule: git_checkout; took: 0:00:00.000835
DEBUG: Importing rule: git_commit_amend; took: 0:00:00.000306
DEBUG: Importing rule: git_commit_reset; took: 0:00:00.000281
DEBUG: Importing rule: git_diff_no_index; took: 0:00:00.000288
DEBUG: Importing rule: git_diff_staged; took: 0:00:00.000275
DEBUG: Importing rule: git_fix_stash; took: 0:00:00.000285
DEBUG: Importing rule: git_flag_after_filename; took: 0:00:00.000278
DEBUG: Importing rule: git_help_aliased; took: 0:00:00.000278
DEBUG: Importing rule: git_merge; took: 0:00:00.000272
DEBUG: Importing rule: git_merge_unrelated; took: 0:00:00.000264
DEBUG: Importing rule: git_not_command; took: 0:00:00.000326
DEBUG: Importing rule: git_pull; took: 0:00:00.000277
DEBUG: Importing rule: git_pull_clone; took: 0:00:00.000272
DEBUG: Importing rule: git_pull_uncommitted_changes; took: 0:00:00.000270
DEBUG: Importing rule: git_push; took: 0:00:00.000273
DEBUG: Importing rule: git_push_different_branch_names; took: 0:00:00.000268
DEBUG: Importing rule: git_push_force; took: 0:00:00.000270
DEBUG: Importing rule: git_push_pull; took: 0:00:00.000273
DEBUG: Importing rule: git_push_without_commits; took: 0:00:00.000352
DEBUG: Importing rule: git_rebase_merge_dir; took: 0:00:00.000279
DEBUG: Importing rule: git_rebase_no_changes; took: 0:00:00.000187
DEBUG: Importing rule: git_remote_delete; took: 0:00:00.000264
DEBUG: Importing rule: git_remote_seturl_add; took: 0:00:00.000192
DEBUG: Importing rule: git_rm_local_modifications; took: 0:00:00.000297
DEBUG: Importing rule: git_rm_recursive; took: 0:00:00.000324
DEBUG: Importing rule: git_rm_staged; took: 0:00:00.000276
DEBUG: Importing rule: git_stash; took: 0:00:00.000271
DEBUG: Importing rule: git_stash_pop; took: 0:00:00.000273
DEBUG: Importing rule: git_tag_force; took: 0:00:00.000265
DEBUG: Importing rule: git_two_dashes; took: 0:00:00.000273
DEBUG: Importing rule: go_run; took: 0:00:00.000287
DEBUG: Importing rule: gradle_no_task; took: 0:00:00.000598
DEBUG: Importing rule: gradle_wrapper; took: 0:00:00.000341
DEBUG: Importing rule: grep_arguments_order; took: 0:00:00.000293
DEBUG: Importing rule: grep_recursive; took: 0:00:00.000296
DEBUG: Importing rule: grunt_task_not_found; took: 0:00:00.000514
DEBUG: Importing rule: gulp_not_task; took: 0:00:00.000295
DEBUG: Importing rule: has_exists_script; took: 0:00:00.000275
DEBUG: Importing rule: heroku_multiple_apps; took: 0:00:00.000287
DEBUG: Importing rule: heroku_not_command; took: 0:00:00.000285
DEBUG: Importing rule: history; took: 0:00:00.000116
DEBUG: Importing rule: hostscli; took: 0:00:00.000655
DEBUG: Importing rule: ifconfig_device_not_found; took: 0:00:00.000415
DEBUG: Importing rule: java; took: 0:00:00.000295
DEBUG: Importing rule: javac; took: 0:00:00.000282
DEBUG: Importing rule: lein_not_task; took: 0:00:00.000615
DEBUG: Importing rule: ln_no_hard_link; took: 0:00:00.000452
DEBUG: Importing rule: ln_s_order; took: 0:00:00.000435
DEBUG: Importing rule: long_form_help; took: 0:00:00.000128
DEBUG: Importing rule: ls_all; took: 0:00:00.000304
DEBUG: Importing rule: ls_lah; took: 0:00:00.000298
DEBUG: Importing rule: man; took: 0:00:00.000308
DEBUG: Importing rule: man_no_space; took: 0:00:00.000105
DEBUG: Importing rule: mercurial; took: 0:00:00.000275
DEBUG: Importing rule: missing_space_before_subcommand; took: 0:00:00.000117
DEBUG: Importing rule: mkdir_p; took: 0:00:00.000281
DEBUG: Importing rule: mvn_no_command; took: 0:00:00.000317
DEBUG: Importing rule: mvn_unknown_lifecycle_phase; took: 0:00:00.000287
DEBUG: Importing rule: no_command; took: 0:00:00.000282
DEBUG: Importing rule: no_such_file; took: 0:00:00.000114
DEBUG: Importing rule: npm_missing_script; took: 0:00:00.000624
DEBUG: Importing rule: npm_run_script; took: 0:00:00.000367
DEBUG: Importing rule: npm_wrong_command; took: 0:00:00.000446
DEBUG: Importing rule: open; took: 0:00:00.000362
DEBUG: Importing rule: pacman; took: 0:00:00.000502
DEBUG: Importing rule: pacman_not_found; took: 0:00:00.000116
DEBUG: Importing rule: path_from_history; took: 0:00:00.000126
DEBUG: Importing rule: php_s; took: 0:00:00.000314
DEBUG: Importing rule: pip_install; took: 0:00:00.000375
DEBUG: Importing rule: pip_unknown_command; took: 0:00:00.000362
DEBUG: Importing rule: port_already_in_use; took: 0:00:00.000196
DEBUG: Importing rule: prove_recursively; took: 0:00:00.000283
DEBUG: Importing rule: pyenv_no_such_command; took: 0:00:00.000610
DEBUG: Importing rule: python_command; took: 0:00:00.000301
DEBUG: Importing rule: python_execute; took: 0:00:00.000275
DEBUG: Importing rule: quotation_marks; took: 0:00:00.000099
DEBUG: Importing rule: react_native_command_unrecognized; took: 0:00:00.000368
DEBUG: Importing rule: remove_trailing_cedilla; took: 0:00:00.000103
DEBUG: Importing rule: rm_dir; took: 0:00:00.000283
DEBUG: Importing rule: rm_root; took: 0:00:00.000373
DEBUG: Importing rule: scm_correction; took: 0:00:00.000289
DEBUG: Importing rule: sed_unterminated_s; took: 0:00:00.000282
DEBUG: Importing rule: sl_ls; took: 0:00:00.000098
DEBUG: Importing rule: ssh_known_hosts; took: 0:00:00.000281
DEBUG: Importing rule: sudo; took: 0:00:00.000105
DEBUG: Importing rule: sudo_command_from_user_path; took: 0:00:00.000280
DEBUG: Importing rule: switch_lang; took: 0:00:00.000145
DEBUG: Importing rule: systemctl; took: 0:00:00.000448
DEBUG: Importing rule: test.py; took: 0:00:00.000098
DEBUG: Importing rule: tmux; took: 0:00:00.000332
DEBUG: Importing rule: touch; took: 0:00:00.000405
DEBUG: Importing rule: tsuru_login; took: 0:00:00.000333
DEBUG: Importing rule: tsuru_not_command; took: 0:00:00.000317
DEBUG: Importing rule: unknown_command; took: 0:00:00.000107
DEBUG: Importing rule: unsudo; took: 0:00:00.000098
DEBUG: Importing rule: vagrant_up; took: 0:00:00.000282
DEBUG: Importing rule: whois; took: 0:00:00.000441
DEBUG: Importing rule: workon_doesnt_exists; took: 0:00:00.000371
DEBUG: Importing rule: yarn_alias; took: 0:00:00.000272
DEBUG: Importing rule: yarn_command_not_found; took: 0:00:00.000719
DEBUG: Importing rule: yarn_command_replaced; took: 0:00:00.000386
DEBUG: Importing rule: yarn_help; took: 0:00:00.000285
DEBUG: Trying rule: path_from_history; took: 0:00:00.000518
DEBUG: Trying rule: dry; took: 0:00:00.000080
DEBUG: Trying rule: git_stash_pop; took: 0:00:00.000024
DEBUG: Trying rule: test.py; took: 0:00:00.000002
DEBUG: Trying rule: adb_unknown_command; took: 0:00:00.000015
DEBUG: Trying rule: ag_literal; took: 0:00:00.000015
DEBUG: Trying rule: apt_get; took: 0:00:00.000358
DEBUG: Trying rule: apt_get_search; took: 0:00:00.000020
DEBUG: Trying rule: apt_invalid_operation; took: 0:00:00.000068
DEBUG: Trying rule: apt_list_upgradable; took: 0:00:00.000059
DEBUG: Trying rule: apt_upgrade; took: 0:00:00.000019
DEBUG: Trying rule: aws_cli; took: 0:00:00.000015
DEBUG: Trying rule: az_cli; took: 0:00:00.000014
DEBUG: Trying rule: brew_link; took: 0:00:00.000016
DEBUG: Trying rule: brew_reinstall; took: 0:00:00.000013
DEBUG: Trying rule: brew_uninstall; took: 0:00:00.000012
DEBUG: Trying rule: brew_update_formula; took: 0:00:00.000013
DEBUG: Trying rule: cargo; took: 0:00:00.000002
DEBUG: Trying rule: cargo_no_command; took: 0:00:00.000015
DEBUG: Trying rule: cat_dir; took: 0:00:00.000015
DEBUG: Trying rule: cd_correction; took: 0:00:00.000055
DEBUG: Trying rule: cd_mkdir; took: 0:00:00.000017
DEBUG: Trying rule: cd_parent; took: 0:00:00.000002
DEBUG: Trying rule: chmod_x; took: 0:00:00.000003
DEBUG: Trying rule: composer_not_command; took: 0:00:00.000014
DEBUG: Trying rule: cp_omitting_directory; took: 0:00:00.000053
DEBUG: Trying rule: cpp11; took: 0:00:00.000015
DEBUG: Trying rule: dirty_untar; took: 0:00:00.000014
DEBUG: Trying rule: dirty_unzip; took: 0:00:00.000013
DEBUG: Trying rule: django_south_ghost; took: 0:00:00.000003
DEBUG: Trying rule: django_south_merge; took: 0:00:00.000002
DEBUG: Trying rule: docker_login; took: 0:00:00.000014
DEBUG: Trying rule: docker_not_command; took: 0:00:00.000053
DEBUG: Trying rule: fab_command_not_found; took: 0:00:00.000014
DEBUG: Trying rule: fix_alt_space; took: 0:00:00.000008
DEBUG: Trying rule: fix_file; took: 0:00:00.000009
DEBUG: Trying rule: gem_unknown_command; took: 0:00:00.000018
DEBUG: Trying rule: git_add; took: 0:00:00.000013
DEBUG: Trying rule: git_add_force; took: 0:00:00.000011
DEBUG: Trying rule: git_bisect_usage; took: 0:00:00.000012
DEBUG: Trying rule: git_branch_delete; took: 0:00:00.000011
DEBUG: Trying rule: git_branch_exists; took: 0:00:00.000011
DEBUG: Trying rule: git_branch_list; took: 0:00:00.000011
DEBUG: Trying rule: git_checkout; took: 0:00:00.000011
DEBUG: Trying rule: git_commit_amend; took: 0:00:00.000010
DEBUG: Trying rule: git_commit_reset; took: 0:00:00.000014
DEBUG: Trying rule: git_diff_no_index; took: 0:00:00.000011
DEBUG: Trying rule: git_diff_staged; took: 0:00:00.000011
DEBUG: Trying rule: git_fix_stash; took: 0:00:00.000011
DEBUG: Trying rule: git_flag_after_filename; took: 0:00:00.000011
DEBUG: Trying rule: git_help_aliased; took: 0:00:00.000011
DEBUG: Trying rule: git_merge; took: 0:00:00.000011
DEBUG: Trying rule: git_merge_unrelated; took: 0:00:00.000011
DEBUG: Trying rule: git_not_command; took: 0:00:00.000011
DEBUG: Trying rule: git_pull; took: 0:00:00.000014
DEBUG: Trying rule: git_pull_clone; took: 0:00:00.000011
DEBUG: Trying rule: git_pull_uncommitted_changes; took: 0:00:00.000011
DEBUG: Trying rule: git_push; took: 0:00:00.000011
DEBUG: Trying rule: git_push_different_branch_names; took: 0:00:00.000011
DEBUG: Trying rule: git_push_pull; took: 0:00:00.000011
DEBUG: Trying rule: git_push_without_commits; took: 0:00:00.000011
DEBUG: Trying rule: git_rebase_merge_dir; took: 0:00:00.000011
DEBUG: Trying rule: git_rebase_no_changes; took: 0:00:00.000011
DEBUG: Trying rule: git_remote_delete; took: 0:00:00.000014
DEBUG: Trying rule: git_remote_seturl_add; took: 0:00:00.000011
DEBUG: Trying rule: git_rm_local_modifications; took: 0:00:00.000011
DEBUG: Trying rule: git_rm_recursive; took: 0:00:00.000011
DEBUG: Trying rule: git_rm_staged; took: 0:00:00.000011
DEBUG: Trying rule: git_stash; took: 0:00:00.000011
DEBUG: Trying rule: git_tag_force; took: 0:00:00.000012
DEBUG: Trying rule: git_two_dashes; took: 0:00:00.000011
DEBUG: Trying rule: go_run; took: 0:00:00.000015
DEBUG: Trying rule: gradle_no_task; took: 0:00:00.000018
DEBUG: Trying rule: gradle_wrapper; took: 0:00:00.000014
DEBUG: Trying rule: grep_arguments_order; took: 0:00:00.000014
DEBUG: Trying rule: grep_recursive; took: 0:00:00.000013
DEBUG: Trying rule: grunt_task_not_found; took: 0:00:00.000014
DEBUG: Trying rule: gulp_not_task; took: 0:00:00.000013
DEBUG: Trying rule: has_exists_script; took: 0:00:00.000053
DEBUG: Trying rule: heroku_multiple_apps; took: 0:00:00.000015
DEBUG: Trying rule: heroku_not_command; took: 0:00:00.000015
DEBUG: Trying rule: hostscli; took: 0:00:00.000053
DEBUG: Trying rule: ifconfig_device_not_found; took: 0:00:00.000014
DEBUG: Trying rule: java; took: 0:00:00.000013
DEBUG: Trying rule: javac; took: 0:00:00.000014
DEBUG: Trying rule: lein_not_task; took: 0:00:00.000052
DEBUG: Trying rule: ln_no_hard_link; took: 0:00:00.000007
DEBUG: Trying rule: ln_s_order; took: 0:00:00.000044
DEBUG: Trying rule: ls_all; took: 0:00:00.000015
DEBUG: Trying rule: ls_lah; took: 0:00:00.000012
DEBUG: Trying rule: man; took: 0:00:00.000014
DEBUG: Trying rule: mercurial; took: 0:00:00.000017
DEBUG: Trying rule: mkdir_p; took: 0:00:00.000007
DEBUG: Trying rule: mvn_no_command; took: 0:00:00.000020
DEBUG: Trying rule: mvn_unknown_lifecycle_phase; took: 0:00:00.000012
DEBUG: Trying rule: no_such_file; took: 0:00:00.000608
DEBUG: Trying rule: npm_missing_script; took: 0:00:00.000017
DEBUG: Trying rule: npm_run_script; took: 0:00:00.000012
DEBUG: Trying rule: npm_wrong_command; took: 0:00:00.000059
DEBUG: Trying rule: open; took: 0:00:00.000019
DEBUG: Trying rule: php_s; took: 0:00:00.000019
DEBUG: Trying rule: pip_install; took: 0:00:00.000058
DEBUG: Trying rule: pip_unknown_command; took: 0:00:00.000055
DEBUG: Trying rule: port_already_in_use; took: 0:00:00.000489
DEBUG: Trying rule: prove_recursively; took: 0:00:00.000022
DEBUG: Trying rule: pyenv_no_such_command; took: 0:00:00.000015
DEBUG: Trying rule: python_command; took: 0:00:00.000047
DEBUG: Trying rule: python_execute; took: 0:00:00.000015
DEBUG: Trying rule: quotation_marks; took: 0:00:00.000003
DEBUG: Trying rule: react_native_command_unrecognized; took: 0:00:00.000013
DEBUG: Trying rule: remove_trailing_cedilla; took: 0:00:00.000003
DEBUG: Trying rule: rm_dir; took: 0:00:00.000009
DEBUG: Trying rule: scm_correction; took: 0:00:00.000017
DEBUG: Trying rule: sed_unterminated_s; took: 0:00:00.000013
DEBUG: Trying rule: sl_ls; took: 0:00:00.000002
DEBUG: Trying rule: ssh_known_hosts; took: 0:00:00.000014
DEBUG: Trying rule: sudo; took: 0:00:00.000004
DEBUG: Trying rule: sudo_command_from_user_path; took: 0:00:00.000125
DEBUG: Trying rule: switch_lang; took: 0:00:00.000022
DEBUG: Trying rule: systemctl; took: 0:00:00.000057
DEBUG: Trying rule: tmux; took: 0:00:00.000014
DEBUG: Trying rule: touch; took: 0:00:00.000016
DEBUG: Trying rule: tsuru_login; took: 0:00:00.000013
DEBUG: Trying rule: tsuru_not_command; took: 0:00:00.000012
DEBUG: Trying rule: unknown_command; took: 0:00:00.000114
DEBUG: Trying rule: unsudo; took: 0:00:00.000004
DEBUG: Trying rule: vagrant_up; took: 0:00:00.000015
DEBUG: Trying rule: whois; took: 0:00:00.000014
DEBUG: Trying rule: workon_doesnt_exists; took: 0:00:00.000014
DEBUG: Trying rule: yarn_alias; took: 0:00:00.000013
DEBUG: Trying rule: yarn_command_not_found; took: 0:00:00.000014
DEBUG: Trying rule: yarn_command_replaced; took: 0:00:00.000021
DEBUG: Trying rule: yarn_help; took: 0:00:00.000014
DEBUG: Trying rule: man_no_space; took: 0:00:00.000002
DEBUG: Trying rule: no_command; took: 0:00:00.011747
sudo install python [enter/↑/↓/ctrl+c]
Aborted
DEBUG: Total took: 0:00:04.897380

```

While this is an opinionated review rather than objectively a bug, I would imagine the correction I suggested is a little more intuitive than the current correction.

In case my suggestion is well-accepted, I would be take this issue and make the correction. (Happy Hacktoberfest!)

{'base_commit': '8fa10b1049ddf21f188b9605bcd5afbe33bf33db', 'files': [{'path': 'README.md', 'status': 'modified', 'Loc': {'(None, None, None)': {'add': [338]}}}]}


CLN: private impl of OrderedDefaultDict can be removed

https://github.com/pandas-dev/pandas/blob/master/pandas/compat/__init__.py#L376

I think this was leftover from 2.6 compat.