[Bug]: 代理配置成功，代理所在地查询超时，代理可能无效

### Installation Method | 安装方法与平台

Docker（Windows/Mac）

### Version | 版本

Latest | 最新版

### OS | 操作系统

Mac

### Describe the bug | 简述

按照要求修改代理配置文件`config.py`，基于`Dockerfile`构建之后运行出现，`代理配置成功，代理所在地查询超时，代理可能无效`的警告⚠，实际运行报错`ConnectionRefusedError: [Errno 111] Connection refused`，请帮帮我哪里配置可能有误
ps.代理服务地址端口配置正确，且运行正常，可以访问外网

### Screen Shot | 有帮助的截图

<img width="921" alt="截屏2023-07-21 21 12 53" src="https://github.com/binary-husky/gpt_academic/assets/97352201/5f54b0b4-a515-4ae6-8360-1b1504683688">

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_

{'base_commit': 'dd7a01cda53628ea07ef6192bf257f9ad51f5f47', 'files': [{'path': 'check_proxy.py', 'Loc': {"(None, 'check_proxy', 2)": {'mod': [6]}}, 'status': 'modified'}]}


[Feature]: 请问是否成功修改 api2d-gpt-3.5-turbo-16k 系列模型 max_token 为 16385

### Class | 类型

大语言模型

### Feature Request | 功能请求

_No response_

{'base_commit': 'ea4e03b1d892d462f71bab76ee0bec65d541f6b7', 'files': [{'path': 'request_llms/bridge_all.py', 'Loc': {}}]}


[Bug]: Json异常 “error”:

### Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt)

### Version | 版本

Latest | 最新版

### OS | 操作系统

Mac

### Describe the bug | 简述

Traceback (most recent call last):
  File "./request_llm/bridge_chatgpt.py", line 189, in predict
    if ('data: [DONE]' in chunk_decoded) or (len(json.loads(chunk_decoded[6:])['choices'][0]["delta"]) == 0):
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Json异常 “error”: { “message”: “”, “type”: “invalid_request_error”, “param”: null, “code”: “invalid_api_key” }}

### Screen Shot | 有帮助的截图

<img width="1341" alt="image" src="https://github.com/binary-husky/gpt_academic/assets/125801419/c448d538-e762-4bbe-b76a-05d921c34ded">

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

gpt-3.5-turbo : 0 : 1 ..........
Traceback (most recent call last):
  File "/Users/zihengli/chatgpt_academic/request_llm/bridge_chatgpt.py", line 189, in predict
    if ('data: [DONE]' in chunk_decoded) or (len(json.loads(chunk_decoded[6:])['choices'][0]["delta"]) == 0):
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/zihengli/anaconda3/envs/gptac_venv/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

{'base_commit': '526b4d8ecd1adbdcf97946b3bca4c89feda6ec04', 'files': [{'path': 'config.py', 'Loc': {'(None, None, None)': {'mod': [1]}}, 'status': 'modified'}, {'path': 'README.md', 'Loc': {'(None, None, 101)': {'mod': [101]}}, 'status': 'modified'}]}


[Bug]: Connection errored out

### Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt)

### Version | 版本

Latest | 最新版

### OS | 操作系统

Linux

### Describe the bug | 简述

你好, 版本3.54
部署在vps上, os是ubuntu 20.04
挂在了公网, 此前均可正常使用
但是突然出现了这样的问题, 如下图

请问这是什么原因呢? 是该vps的ip不行, 被openai ban了么? 还是什么别的原因, 谢谢

### Screen Shot | 有帮助的截图

![Snipaste_2023-09-30_15-01-00](https://github.com/binary-husky/gpt_academic/assets/59535777/9567364a-6bff-4878-b92a-94087a02c655)

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_


**Describe the bug 简述**
ERROR: Invalid requirement: '__pycache__/' (from line 2 of requirements.txt)
**Screen Shot 截图**
![image](https://user-images.githubusercontent.com/46212839/231796758-e537f323-bb03-4fb1-97c8-3b80fddc8476.png)

![image](https://user-images.githubusercontent.com/46212839/231796688-14d0eb47-8ea7-4d73-9ccd-259b1b10f5df.png)

**Terminal Traceback 终端traceback（如果有）**

Before submitting an issue 提交issue之前：
- Please try to upgrade your code. 如果您的代码不是最新的，建议您先尝试更新代码
- Please check project wiki for common problem solutions.项目[wiki](https://github.com/binary-husky/chatgpt_academic/wiki)有一些常见问题的解决方法


上传文件时重复上传


[Bug]: 虽然PDF生成失败了, 但请查收结果（压缩包）, 内含已经翻译的Tex文档, 您可以到Github Issue区, 用该压缩包进行反馈。如系统是Linux，请检查系统字体（见Github wiki） ...

### Installation Method | 安装方法与平台

Anaconda (I used latest requirements.txt)

### Version | 版本

Latest | 最新版

### OS | 操作系统

Windows

### Describe the bug | 简述

由于最为关键的转化PDF编译失败, 将根据报错信息修正tex源文件并重试, 当前报错的latex代码处于第[-1]行 ...

虽然PDF生成失败了, 但请查收结果（压缩包）, 内含已经翻译的Tex文档, 您可以到Github Issue区, 用该压缩包进行反馈。如系统是Linux，请检查系统字体（见Github wiki） ...

报告已经添加到右侧“文件上传区”（可能处于折叠状态），请查收。
[gpt_log\default_user\shared\2024-01-18-14-25-51-result.zip](http://localhost:50649/file=C:/Users/admin/gpt_academic/gpt_log/default_user/shared/2024-01-18-14-25-51-result.zip)
[gpt_log\default_user\shared\2024-01-18-14-25-41.trans.html](http://localhost:50649/file=C:/Users/admin/gpt_academic/gpt_log/default_user/shared/2024-01-18-14-25-41.trans.html)

### Screen Shot | 有帮助的截图

![image](https://github.com/binary-husky/gpt_academic/assets/102421741/01fc2c02-ea15-4717-af77-e89797e407d1)

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

[2024-01-18-14-25-51-result.zip](https://github.com/binary-husky/gpt_academic/files/13973247/2024-01-18-14-25-51-result.zip)


### Describe the bug

启动程序后，能打开页面正常显示，但是上传文档或者发送提问法会出错“Something went wrong Connection errored out.”

### Is there an existing issue for this?

- [ ] I have searched the existing issues

### Reproduction

按照正常步骤：
git clone https://github.com/binary-husky/chatgpt_academic.git
cd chatgpt_academic
python -m pip install -r requirements.txt
python main.py

config.py的配置是：
USE_PROXY = True

### Screenshot

给出了正确的API key，却发现从没使用过

### Logs

```shell
控制台报错[Error] WebSocket connection to 'ws://localhost:62694/queue/join' failed: There was a bad response from the server. (x4)
```

### System Info

```shell
gradio:3.24.1
ProductName:macOS
ProductVersion:13.3
BuildVersion:22E252
```

### Severity

annoying


能不能使用azure openai key?

代理服务器不够稳定，更麻烦的是给openai续费，还要个美国信用卡

非常好的应用，希望出更多的插件功能，谢谢


[Bug]: 精准翻译PDF文档(NOUGAT)功能出错，

### Installation Method | 安装方法与平台

Others (Please Describe)

### Version | 版本

Please choose | 请选择

### OS | 操作系统

Please choose | 请选择

### Describe the bug | 简述

测试服务器，精准翻译PDF文档(NOUGAT)功能出错，但是可以使用精准翻译PDF的功能

![image](https://github.com/binary-husky/gpt_academic/assets/51499671/b9a0db8c-282a-4e02-a527-97fcf63eaaa0)

报错信息如下
![image](https://github.com/binary-husky/gpt_academic/assets/51499671/b40e4d8b-ade9-4e27-86e5-75f6027fbbb0)

### Screen Shot | 有帮助的截图

![image](https://github.com/binary-husky/gpt_academic/assets/51499671/ac4995d5-0a68-433b-aa44-2b3c82bbc1e3)
Traceback (most recent call last):
  File "./toolbox.py", line 159, in decorated
    yield from f(main_input, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, *args, **kwargs)
  File "./crazy_functions/批量翻译PDF文档_NOUGAT.py", line 93, in 批量翻译PDF文档
    yield from 解析PDF_基于NOUGAT(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt)
  File "./crazy_functions/批量翻译PDF文档_NOUGAT.py", line 111, in 解析PDF_基于NOUGAT
    fpp = yield from nougat_handle.NOUGAT_parse_pdf(fp, chatbot, history)
  File "./crazy_functions/crazy_utils.py", line 761, in NOUGAT_parse_pdf
    raise RuntimeError("Nougat解析论文失败。")
RuntimeError: Nougat解析论文失败。

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_

{'base_commit': '2d2e02040d7d91d2f2a4c34f4d0bf677873b5f4d', 'files': [{'path': 'crazy_functions/crazy_utils.py', 'Loc': {"('nougat_interface', 'NOUGAT_parse_pdf', 739)": {'mod': [752]}, "('nougat_interface', None, 719)": {'mod': [723]}}, 'status': 'modified'}]}


[一些建议]input框还是太小了

RT 多行输入还是不方便，如果适当调整会更好用。

希望采纳，感谢分享。

{'base_commit': '17abd29d5035b5b227deaad69d32cf437b23e542', 'files': [{'path': 'main.py', 'Loc': {'(None, None, None)': {'mod': [1]}}, 'status': 'modified'}]}


[Bug]: 浮动输入框在拖至顶部后，无法重新移位

### Installation Method | 安装方法与平台

Others (Please Describe)

### Version | 版本

Please choose | 请选择

### OS | 操作系统

Mac

### Describe the bug | 简述

浮动输入框在拖至顶部后，无法重新移位

期望：重新勾选后，应该回到初始位置

### Screen Shot | 有帮助的截图

![2024-01-02 14 36 52](https://github.com/binary-husky/gpt_academic/assets/46100050/86a648dc-ab38-486f-9a0b-7f71dde0bd57)

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_

{'base_commit': 'fb67dd12f58aa53c75a90378cddbc811ac3c01d2', 'files': [{'path': 'js/app/src/components/Floating/StaticFloating.svelte', 'status': 'modified', 'Loc': {'(None, None, 48)': {'add': [48]}}}]}


想问问newbing的cookies怎么填写，我从javascript:alert(document.cookie)找到了cookies但是一直显示cookies有错


有没有完全部署成功的大神出个详细的部署步骤呀？Windows 有截图，跪求

Windows安装部署
基本环：安装anaconda
1.下载项目 CMD
选择路径
git clone https://github.com/binary-husky/chatgpt_academic.git
cd chatgpt_academic
我们建议将config.py复制为config_private.py并将后者用作个性化配置文件以避免config.py中的变更影响你的使用或不小心将包含你的OpenAI API KEY的config.py提交至本项目。
cp config.py config_private.py
2.创建虚拟环境 python 3.11
conda create -n chatgpt python=3.11.0 #新建环境、
3.进入项目下载路径
例如 cd  G:\python\Program\chatgpt_academic
4.启动虚拟环境
conda activate chatgpt
5. 安装 gradio>=3.23
（1）到https://pypi.org/project/gradio/ 下载whl版本
（2）pip install  G:\python\Program\chatgpt_academic\gradio-3.23.0-py3-none-any.whl
6.配置其他环境
（1）打开requirements.txt，注释掉gradio，然后保存
（2）运行 python -m pip install -r requirements.txt
7.启动代理
8. 配置config_private.py
（1）添加API_KEY
（2）修改USE_PROXY = Ture
（3）修改proxies
在浏览器输入: https://ipapi.co/json/
浏览器上右键->检查->网络->ctrl+r
打开json，将远程地址修改到proxies = { "http": "104.26.9.44:443", "https": "104.26.9.44:443", }
9.启动程序
python main.py

{'base_commit': '6d8c8cd3f0b9d2b6fe8d412b83f902cbd43fa0bd', 'files': [{'path': 'requirements.txt', 'Loc': {}}]}


能否增加聊天内容导出功能？


[Bug]:

### Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt and python>=3.8)

### Describe the bug | 简述

只有出去的消息，没有返回消息，试过了ap2id和newbing

### Screen Shot | 有帮助的截图

![微信截图_20230517095200](https://github.com/binary-husky/gpt_academic/assets/43396544/32d9bc41-351b-4ceb-a7d2-99e09b21ddb5)

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback（如有） + 帮助我们复现的测试材料样本（如有）

_No response_

{'base_commit': '6c448b9a601ba4b9cc84e8bc625a3a91b1982ba4', 'files': [{'path': 'request_llms/requirements_newbing.txt', 'Loc': {}}]}


Please provide the code for your model architecture.

**Is your feature request related to a problem? Please describe.**
This repo only provides weights. It makes it difficult to confirm claims from the article.

**Describe the solution you'd like**
 A repo where the code to the model architecture is provided.

**Describe alternatives you've considered**
Clearly state that the model is not open source.

**Additional context**
None


[BUG]convert后运行错误

**Describe the bug**
[rank0]: ValueError: Unrecognized model in ../DV3-hf-32/. Should have a `model_type` key in its config.json, or contain one of the following strings in its name: albert, align, altclip, audio-spectrogram-transformer, autoformer, bark, bart, beit, bert, bert-generation, big_bird, bigbird_pegasus, biogpt, bit, blenderbot, blenderbot-small, blip, blip-2, bloom, bridgetower, bros, camembert, canine, chameleon, chinese_clip, chinese_clip_vision_model, clap, clip, clip_text_model, clip_vision_model, clipseg, clvp, code_llama, codegen, cohere, conditional_detr, convbert, convnext, convnextv2, cpmant, ctrl, cvt, dac, data2vec-audio, data2vec-text, data2vec-vision, dbrx, deberta, deberta-v2, decision_transformer, deformable_detr, deit, depth_anything, deta, detr, dinat, dinov2, distilbert, donut-swin, dpr, dpt, efficientformer, efficientnet, electra, encodec, encoder-decoder, ernie, ernie_m, esm, falcon, falcon_mamba, fastspeech2_conformer, flaubert, flava, fnet, focalnet, fsmt, funnel, fuyu, gemma, gemma2, git, glm, glpn, gpt-sw3, gpt2, gpt_bigcode, gpt_neo, gpt_neox, gpt_neox_japanese, gptj, gptsan-japanese, granite, granitemoe, graphormer, grounding-dino, groupvit, hiera, hubert, ibert, idefics, idefics2, idefics3, imagegpt, informer, instructblip, instructblipvideo, jamba, jetmoe, jukebox, kosmos-2, layoutlm, layoutlmv2, layoutlmv3, led, levit, lilt, llama, llava, llava_next, llava_next_video, llava_onevision, longformer, longt5, luke, lxmert, m2m_100, mamba, mamba2, marian, markuplm, mask2former, maskformer, maskformer-swin, mbart, mctct, mega, megatron-bert, mgp-str, mimi, mistral, mixtral, mllama, mobilebert, mobilenet_v1, mobilenet_v2, mobilevit, mobilevitv2, moshi, mpnet, mpt, mra, mt5, musicgen, musicgen_melody, mvp, nat, nemotron, nezha, nllb-moe, nougat, nystromformer, olmo, olmoe, omdet-turbo, oneformer, open-llama, openai-gpt, opt, owlv2, owlvit, paligemma, patchtsmixer, patchtst, pegasus, pegasus_x, perceiver, persimmon, phi, phi3, phimoe, pix2struct, pixtral, plbart, poolformer, pop2piano, prophetnet, pvt, pvt_v2, qdqbert, qwen2, qwen2_audio, qwen2_audio_encoder, qwen2_moe, qwen2_vl, rag, realm, recurrent_gemma, reformer, regnet, rembert, resnet, retribert, roberta, roberta-prelayernorm, roc_bert, roformer, rt_detr, rt_detr_resnet, rwkv, sam, seamless_m4t, seamless_m4t_v2, segformer, seggpt, sew, sew-d, siglip, siglip_vision_model, speech-encoder-decoder, speech_to_text, speech_to_text_2, speecht5, splinter, squeezebert, stablelm, starcoder2, superpoint, swiftformer, swin, swin2sr, swinv2, switch_transformers, t5, table-transformer, tapas, time_series_transformer, timesformer, timm_backbone, trajectory_transformer, transfo-xl, trocr, tvlt, tvp, udop, umt5, unispeech, unispeech-sat, univnet, upernet, van, video_llava, videomae, vilt, vipllava, vision-encoder-decoder, vision-text-dual-encoder, visual_bert, vit, vit_hybrid, vit_mae, vit_msn, vitdet, vitmatte, vits, vivit, wav2vec2, wav2vec2-bert, wav2vec2-conformer, wavlm, whisper, xclip, xglm, xlm, xlm-prophetnet, xlm-roberta, xlm-roberta-xl, xlnet, xmod, yolos, yoso, zamba, zoedepth

**To Reproduce**
Steps to reproduce the behavior.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.


IndexError: list index out of range on training

```
# python3.6 faceswap.py train -A ~/faceswap/data/trump -B ~/faceswap/data/stalone -m ~/faceswap/models/
Model A Directory: /root/faceswap/data/trump
Model B Directory: /root/faceswap/data/stalone
Training data directory: /root/faceswap/models
Loading data, this may take a while...
Loading Model from Model_Original plugin...
/usr/local/lib/python3.6/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.
/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)
Failed loading existing training data.
Unable to open file (unable to open file: name = '/root/faceswap/models/encoder.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Loading Trainer from Model_Original plugin...
Starting. Press "Enter" to stop training and save model
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/root/faceswap/lib/utils.py", line 42, in run
    for item in self.generator:
  File "/root/faceswap/lib/training_data.py", line 43, in minibatch
    rtn = numpy.float32([read_image(data[j]) for j in range(i,i+size)])
  File "/root/faceswap/lib/training_data.py", line 43, in <listcomp>
    rtn = numpy.float32([read_image(data[j]) for j in range(i,i+size)])
IndexError: list index out of range
```

## Expected behavior
There shouldn't be "IndexError: list index out of range"

## Actual behavior

*Describe, in some detail, what the program does instead. Be sure to include any error message or screenshots.*

## Steps to reproduce

## Other relevant information
H/W: 4 cores, 16GB, Nvidial P100
S/W: Ubuntu 16.04, NVIDIA binary driver - version 384.111
CUDA 8.0
CuDNN 6
Python 3.6
faceswap commit: 0f8d9db826d7588f9feb151ab234f2aaf0d8ecf2

{'base_commit': 'c529bd4f1cb3a8abc53574b7211fc0b887107073', 'files': [{'path': 'lib/training_data.py', 'Loc': {"(None, 'minibatch', 33)": {'mod': [38]}}, 'status': 'modified'}, {'path': 'lib/cli/args_train.py', 'Loc': {"('TrainArgs', 'get_argument_list', 35)": {'mod': [140]}}, 'status': 'modified'}]}


[Question] Which part of code to implement 'Configure Settings' GUI?

Which part of code to implement 'Configure Settings' GUI?

![a](https://user-images.githubusercontent.com/32773605/152643917-b26f4b16-71e0-4f9a-8209-93206355f1b6.jpg)

{'base_commit': '183aee37e93708c0ae73845face5b4469319ebd3', 'files': [{'path': 'lib/gui/popup_configure.py', 'Loc': {}}]}


do i have to rename the given training data to src?

if not, where to put the unzip data into directory. sorry for asking newby questions.
i am using pycharm and docker. thanks


help me

virtualenv '/home/test/Desktop/faceswap-master'
python3.5 '/home/test/Desktop/faceswap-master/faceswap.py' -h

test@ubuntu:~$ virtualenv '/home/test/Desktop/faceswap-master'
New python executable in /home/test/Desktop/faceswap-master/bin/python
Installing setuptools, pip, wheel...done.
test@ubuntu:~$ python3.5 '/home/test/Desktop/faceswap-master/faceswap.py' -h
Traceback (most recent call last):
  File "/home/test/Desktop/faceswap-master/faceswap.py", line 8, in <module>
    from lib.utils import FullHelpArgumentParser
  File "/home/test/Desktop/faceswap-master/lib/utils.py", line 5, in <module>
    from scandir import scandir
ImportError: No module named 'scandir'
test@ubuntu:~$

{'base_commit': '68ef3b992674d87d0c73da9c29a4c5a0e735f04b', 'files': [{'path': 'requirements-gpu.txt', 'Loc': {}}]}


Can't Open GUI on Windows

**Describe the bug**
Whenever I try to open the GUI of Faceswap, I get an error and it doesn't open. I am on Windows, and I have uninstalled and reinstalled multiple times, including redoing the conda environment. CLI functions work, but the main GUI does not open, either from the shortcut or a manual terminal run. I have also tried running with and without admin

**To Reproduce**
Steps to reproduce the behavior:
1. Uninstall old Faceswap versions
2. Install the latest windows version
3. Run the Faceswap program in GUI mode
4. See error

**Expected behavior**
I want the Faceswap GUI to open. It doesn't.

**Screenshots**
![image](https://user-images.githubusercontent.com/63259343/183342692-6f1c1bec-df9b-4f71-8a23-f2f77fccc008.png)
![image](https://user-images.githubusercontent.com/63259343/183342835-998834e0-66d6-4751-84e9-a1c150e22063.png)

**Desktop:**
 - OS: [Windows 11]
 - Python Version [3.9.12]
 - Conda Version [4.13.0]
 - Commit ID [6b2aac6]

**Crash Report**
[crash_report.2022.08.07.224753577271.log](https://github.com/deepfakes/faceswap/files/9278810/crash_report.2022.08.07.224753577271.log)

{'base_commit': '629c02a61e1ad5f769f8f7388a091d5ce9aa8160', 'files': [{'path': 'requirements/_requirements_base.txt', 'Loc': {'(None, None, 15)': {'mod': [15]}}, 'status': 'modified'}]}


Modify extractor to focus on mouth

I'd like to modify the extractor script to focus on the lower half of the face - specifically the mouth area.

I'm experimenting with changing people's mouth movements, and I want to train a higher resolution "mouth only" network, so I can create new speech patterns that are re-composited onto the original footage.

Is there a way to modify which facial landmarks the extractor looks at so it just takes the mouth?


Not showing graph in gui

in log gui:
`Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.6/tkinter/__init__.py", line 1705, in __call__
    return self.func(*args)
  File "/home/telecast/Documents/faceswap/lib/gui/command.py", line 461, in <lambda>
    command=lambda cmd=action: cmd(self.command))
  File "/home/telecast/Documents/faceswap/lib/gui/utils.py", line 550, in load
    self.add_to_recent(cfgfile.name, command)
  File "/home/telecast/Documents/faceswap/lib/gui/utils.py", line 596, in add_to_recent
    recent_files = self.serializer.unmarshal(inp.read().decode("utf-8"))
  File "/home/telecast/Documents/faceswap/lib/Serializer.py", line 61, in unmarshal
    return json.loads(input_string)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
`

 faceswap.log:
`03/10/2019 00:02:36 MainProcess     training_0      train           training                  INFO     Loading data, this may take a while...
03/10/2019 00:02:36 MainProcess     training_0      plugin_loader   _import                   INFO     Loading Model from Villain plugin...
03/10/2019 00:02:40 MainProcess     training_0      config          load_config               INFO     Loading config: '/home/telecast/Documents/faceswap/config/train.ini'
03/10/2019 00:02:40 MainProcess     training_0      _base           replace_config            INFO     Using configuration saved in state file
03/10/2019 00:02:40 MainProcess     training_0      deprecation     new_func                  WARNING  From /home/telecast/Documents/faceswap_env/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\nInstructions for updating:\nColocations handled automatically by placer.
03/10/2019 00:02:49 MainProcess     training_0      _base           load                      WARNING  Failed loading existing training data. Generating new models
03/10/2019 00:02:52 MainProcess     training_0      plugin_loader   _import                   INFO     Loading Trainer from Original plugin...
03/10/2019 00:02:54 MainProcess     training_0      _base           set_tensorboard           INFO     Enabled TensorBoard Logging
03/10/2019 00:02:54 MainProcess     training_0      deprecation     new_func                  WARNING  From /home/telecast/Documents/faceswap_env/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\nInstructions for updating:\nUse tf.cast instead.
03/10/2019 00:03:35 MainProcess     training_0      _base           save_models               INFO     saved models
03/10/2019 00:04:29 MainProcess     MainThread      train           end_thread                INFO     Exit requested! The trainer will complete its current cycle, save the models and quit (it can take up a couple of seconds depending on your training speed). If you want to kill it now, press Ctrl + c
03/10/2019 00:04:31 MainProcess     training_0      _base           save_models               INFO     saved models`

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.10

$ pip3 list
Package                 Version
----------------------- --------
absl-py                 0.7.0
astor                   0.7.1
Click                   7.0
cloudpickle             0.8.0
cmake                   3.13.3
cycler                  0.10.0
dask                    1.1.3
decorator               4.3.2
dlib                    19.16.0
face-recognition        1.2.3
face-recognition-models 0.3.0
ffmpy                   0.2.2
gast                    0.2.2
grpcio                  1.19.0
h5py                    2.9.0
Keras                   2.2.4
Keras-Applications      1.0.7
Keras-Preprocessing     1.0.9
kiwisolver              1.0.1
Markdown                3.0.1
matplotlib              2.2.2
mock                    2.0.0
networkx                2.2
numpy                   1.15.4
nvidia-ml-py3           7.352.0
opencv-python           4.0.0.21
pathlib                 1.0.1
pbr                     5.1.3
Pillow                  5.4.1
pip                     19.0.3
protobuf                3.7.0
psutil                  5.6.0
pyparsing               2.3.1
python-dateutil         2.8.0
pytz                    2018.9
PyWavelets              1.0.2
PyYAML                  3.13
scikit-image            0.14.2
scikit-learn            0.20.3
scipy                   1.2.1
setuptools              40.8.0
six                     1.12.0
tensorboard             1.13.1
tensorflow-estimator    1.13.0
tensorflow-gpu          1.13.1
termcolor               1.1.0
toolz                   0.9.0
tqdm                    4.31.1
Werkzeug                0.14.1
wheel                   0.33.1

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

 cudnn v7.4.1.5


Cannot install tensorflow-gpu requirement

Tried installing the requirements-gpu.txt and get this error:

Collecting tensorflow-gpu==1.4.0 (from -r requirements-gpu.txt (line 6)) Cache entry deserialization failed, entry ignored Could not find a version that satisfies the requirement tensorflow-gpu==1.4.0 (from -r requirements-gpu.txt (line 6)) (from versions: ) No matching distribution found for tensorflow-gpu==1.4.0 (from -r requirements-gpu.txt (line 6))

I went here to troubleshoot the issue: https://github.com/tensorflow/tensorflow/issues/8251
Installed Python 64bit. Opened new command prompt window and typed in: pip3 install --upgrade tensorflow-gpu

Successfully uninstalled setuptools-28.8.0
Successfully installed bleach-1.5.0 enum34-1.1.6 html5lib-0.9999999 markdown-2.6.11 numpy-1.13.3 protobuf-3.5.1 setuptools-38.4.0 six-1.11.0 tensorflow-gpu-1.4.0 tensorflow-tensorboard-0.4.0rc3 werkzeug-0.14.1 wheel-0.30.0

Went back to my faceswap env to enter the requirements-gpu.txt and still get the same error:
(faceswap) C:\faceswap>pip install -r requirements-gpu.txt
Collecting tensorflow-gpu==1.4.0 (from -r requirements-gpu.txt (line 6))
  Could not find a version that satisfies the requirement tensorflow-gpu==1.4.0 (from -r requirements-gpu.txt (line 6)) (from versions: )
No matching distribution found for tensorflow-gpu==1.4.0 (from -r requirements-gpu.txt (line 6))

## Other relevant information

- **Operating system and version:** Windows 10
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32
- **Faceswap version:** 1/5/2018
- **Faceswap method:** CPU/GPU    "CPU method only works"
- ...

{'base_commit': 'e518206c8ef935ebc1b1ff64ae2901cc8ef05f94', 'files': [{'path': 'requirements-gpu.txt', 'Loc': {'(None, None, 6)': {'mod': [6]}}, 'status': 'modified'}]}


doesn't work on 2GB GTX 960 even with LowMem model (what params could be reduced?)

LowMem is different from the common model with 2 lines:
ENCODER_DIM = 512       # instead of 1024
#x = self.conv(1024)(x)       - commented out.

But it's still not enough to run under Ubuntu 16.04, cuda8, 1.7Gb of free video RAM.
It fails with OOM on any batch size, even with bs=1 and bs=2.

What about having some configurable params here? Like reducing filters numbers or ENCODER_DIM or smth else?
Also that would be great to have some doc which describes few main params and their influence on quality etc. For example fakeapp allows to select number of layers, nodes etc.

P.S. I managed to run it with ENCODER_DIM = 64 and bs=16, but results are not so good (after 15 hours).


Bounding boxes coordinates

It has been 2 weeks I have been working on it but cannot find the solution.

I want the bounding boxes on the original image, of the result that is produced by the "Extract" process of faceswap code.

"Extract" writes the faces extracted from the input image(s). I just want the coordinates from which this face is extracted (from original image).

If you could help me. I would be very grateful and would also help other people searching for the same problem.
Thank you.

{'base_commit': 'a62a85c0215c1d791dd5ca705ba5a3fef08f0ffd', 'files': [{'path': 'lib/align/detected_face.py', 'Loc': {"('DetectedFace', '__init__', 82)": {'mod': [84, 85, 86, 87]}}, 'status': 'modified'}]}


Problem with FadeOutAndShift

t3 text is not going through FadeOutAndShift.
Also tell me how I can FadeOutAndShift t1 and t3 together

```# python -m manim try3.py test1 -pm

from manimlib.imports import *

class test1(Scene):
	def construct(self):
		t1=TextMobject("Hi!")
		t2=TextMobject("My name is")
		t3=TextMobject("Girish")

		t1.set_color(RED)
		t3.set_color(BLUE)

		self.play(Write(t1), run_time=2)
		self.play(ApplyMethod(t1.shift, 1*UP))
		self.play(FadeIn(t2))
		self.play(Transform(t2, t3), run_time=2)
		self.wait(2)
		self.play(FadeOutAndShift(t1))
                self.play(FadeOutAndShift(t3))

```


ImportError: No module named animation

I've installed manim on Win10.  After run "python  extract_scene.py -s example_scenes.py",

the next error is shown in the python interactive interpretor:

> Traceback (most recent call last):
  File "extract_scene.py", line 15, in <module>
    from scene.scene import Scene
  File "G:\python\manim\scene\scene.py", line 16, in <module>
    from animation.transform import MoveToTarget
  File "G:\python\manim\animation\transform.py", line 8, in <module>
    from animation.animation import Animation
ImportError: No module named animation

What I can do? I'm looking forward to get help to solve this problem.

{'base_commit': 'ce06e58505dff26cccd497a9bd43969f74ae0da9', 'files': [{'path': 'animation/transform.py', 'Loc': {'(None, None, None)': {'mod': [8]}}, 'status': 'modified'}]}


How to add sound to video?

{'base_commit': '55ece141e898577ce44e71d718212a1ee816ed74', 'files': [{'path': 'manimlib/scene/scene.py', 'Loc': {"('Scene', 'add_sound', 543)": {'mod': []}}, 'status': 'modified'}, {'path': 'old_projects/clacks/solution2/simple_scenes.py', 'Loc': {}}]}


Swedish characters not working

Include at least:
1. Steps to reproduce the issue (e.g. the command you ran)
2. The unexpected behavior that occurred (e.g. error messages or screenshots)
3. The environment (e.g. operating system and version of manim)

I am new to manim and want to include swedish characters in a text, but it gives an error message when rendering.
Code:
class Swe(Scene):
	def construct(self):
		text = TextMobject(r"$\"o$")
		self.add(text)
		self.wait()

Error message:
Traceback (most recent call last):
  File "C:\Manim\manim\manim2020\manimlib\extract_scene.py", line 153, in main
    scene = SceneClass(**scene_kwargs)
  File "C:\Manim\manim\manim2020\manimlib\scene\scene.py", line 54, in __init__
    self.construct()
  File "Geony.py", line 115, in construct
    text = TextMobject(r"$\"o$")
  File "C:\Manim\manim\manim2020\manimlib\mobject\svg\tex_mobject.py", line 144, in __init__
    self, self.arg_separator.join(tex_strings), **kwargs
  File "C:\Manim\manim\manim2020\manimlib\mobject\svg\tex_mobject.py", line 45, in __init__
    self.template_tex_file_body
  File "C:\Manim\manim\manim2020\manimlib\utils\tex_file_writing.py", line 19, in tex_to_svg_file
    dvi_file = tex_to_dvi(tex_file)
  File "C:\Manim\manim\manim2020\manimlib\utils\tex_file_writing.py", line 67, in tex_to_dvi
    "See log output above or the log file: %s" % log_file)
Exception: Latex error converting to dvi. See log output above or the log file: C:\Manim\manim\manim2020\manimlib\files\Tex\a26fbd67dc90adbc.log

I am running python 3.7 (64 bit) and MikTex 2.9. All other features of manim are working fine.
Any help would be much appreciated. Also, please keep in mind that I am new to manim and programing in general.


Reconsidering TEX_USE_CTEX / using XeLaTeX

I worked on manim back in 2018. I added the function for using CTeX (XeLaTeX package for Chinese) and XeLaTeX instead of LaTeX using the flag `TEX_USE_CTEX` in constants.py (#315).

I have stopped working on manim since 2019, but over the months there are apparently more and more people who want to use LaTeX rendering in non-English languages, and even on very old issues I still occasionally see people asking how to do that... Looking back at my change I really should have **decoupled using CTeX (TeX template) from XeLaTeX (rendering tool)**. This has caused a *lot* of confusions and made weird hacks/fixes necessary for only using XeLaTeX, especially for a language that is not Chinese or English, with the most recent #858 and #840. It really should have been a flag `TEX_USE_XELATEX` and another flag `TEMPLATE_TEX_NAME`, and the flag `TEX_USE_CTEX` is such that when it is `True`, `TEX_USE_XELATEX` is `True` and `TEMPLATE_TEX_NAME` is `"ctex_template.tex"`; otherwise `TEX_USE_XELATEX` is `False` and `TEMPLATE_TEX_NAME` is `"tex_template.tex"`. Then set `TEMPLATE_TEX_FILE` to `os.path.join(os.path.dirname(os.path.realpath(__file__)), TEMPLATE_TEX_NAME)`. Corresponding logic: constants.py lines 74–79.

It might be even better to set it dynamically using a function or as a parameter of `TexMobject()`, (see issues like #891). I looked at the source code and this is definitely possible. The options I can think of are
1. Use the current `TEX_USE_CTEX`
2. Add flags `TEX_USE_XELATEX` and `TEMPLATE_TEX_NAME`, and rework `TEX_USE_CTEX`
3. Add parameters for `TexMobject()` like `use_xelatex=False` and `tex_template="tex_template.tex"`
4. Use the flags of 2. as a default, and make it possible to change the default using 3.

Not really sure if this is the right place to raise this issue.


ColorByCaracter help

I want to color only theta of ```{ e }^{ i\theta  }```

I was going through ColorByCaracter in 3_text_like_arrays.py .
But I fail to understand how you people separate the tex formula into arrays. I know about arrays but I can only copy the tex code from [Daum Equation Editor](http://s1.daumcdn.net/editor/fp/service_nc/pencil/Pencil_chromestore.html) and paste it. I don't know how to divide them into arrays.

Please help me.

{'base_commit': '49582c35919097585699598ad0ca49fe3f2117b5', 'files': [{'path': 'manimlib/mobject/svg/tex_mobject.py', 'Loc': {"('TexMobject', None, 132)": {'mod': []}}, 'status': 'modified'}]}


OSError: No file matching Suv.svg in image directory

I've tried putting the .SVG image into */media/designs/svg_images. But when I want to quote it in the .py file it still reports errors:

```
Traceback (most recent call last):
  File "/home/jason/Documents/manim/manimlib/extract_scene.py", line 155, in main
    scene = SceneClass(**scene_kwargs)
  File "/home/jason/Documents/manim/manimlib/scene/scene.py", line 53, in __init__
    self.construct()
  File "SVGTEST.py", line 44, in construct
    height=height_size
  File "/home/jason/Documents/manim/manimlib/mobject/svg/svg_mobject.py", line 45, in __init__
    self.ensure_valid_file()
  File "/home/jason/Documents/manim/manimlib/mobject/svg/svg_mobject.py", line 63, in ensure_valid_file
    self.file_name)
OSError: No file matching MYSVG.svg in image directory

```
(Manjaro Linux, Texlive)

{'base_commit': '32abbb9371308e8dff7410de387fe78e64b6fe7a', 'files': [{'path': 'manimlib/mobject/svg/svg_mobject.py', 'Loc': {"('SVGMobject', 'ensure_valid_file', 49)": {'mod': []}}, 'status': 'modified'}]}


can't graph trigonometric function of secx, cscx, cotx, tanx,...

source  code:

class PlotFunctions(GraphScene):
    CONFIG = {
        "x_min" : -10,
        "x_max" : 10.3,
        "y_min" : -1.5,
        "y_max" : 1.5,
        "graph_origin" : ORIGIN ,
        "function_color" : RED ,
        "axes_color" : GREEN,
        "x_labeled_nums" :range(-10,12,2),

    }
    def construct(self):
        self.setup_axes(animate=True)
        func_graph=self.get_graph(self.func_to_graph,self.function_color)
        func_graph2=self.get_graph(self.func_to_graph2)
        vert_line = self.get_vertical_line_to_graph(TAU,func_graph,color=YELLOW)
        graph_lab = self.get_graph_label(func_graph, label = "\\cos(x)")
        graph_lab2=self.get_graph_label(func_graph2,label = "\\sin(x)", x_val=-10, direction=UP/2)
        two_pi = TexMobject("x = 2 \\pi")
        label_coord = self.input_to_graph_point(TAU,func_graph)
        two_pi.next_to(label_coord,RIGHT+UP)

        self.play(ShowCreation(func_graph),ShowCreation(func_graph2))
        self.play(ShowCreation(vert_line), ShowCreation(graph_lab), ShowCreation(graph_lab2),ShowCreation(two_pi))

    def func_to_graph(self,x):
        #return np.cos(x)
        return np.tan(x)

    def func_to_graph2(self,x):
        return np.sin(x)

I replaced "return np.cos(x)" to "return np.tan(x)"...i got this:
![image](https://user-images.githubusercontent.com/36161299/63267544-e140a700-c2c4-11e9-9164-a14d37ee8673.png)

and then I replaced "return np.cos(x)" to "return np.sec(x)/cot(x)/csc(x)"...i got this:
AttributeError: module 'numpy' has no attribute 'sec'...

{'base_commit': 'b74e5ca254bccc1575b4c7b7de3c1cb2010aac75', 'files': [{'path': 'manimlib/mobject/types/vectorized_mobject.py', 'Loc': {"('VGroup', None, 868)": {'mod': []}}, 'status': 'modified'}, {'Loc': [17], 'path': None}]}


Manim can't find my png file

I'm new to coding and am trying to learn manim, which I'm using on my macbook pro. I'm trying to create a scene where manim draws a png file I saved. I saved the png file as "shirt.png" in my manim folder. I then ran the following code:

```
from manimlib.imports import *

class OutFit(Scene):
	def construct(self):

		shirt = ImageMobject("shirt")

		self.play(Write(shirt))
```
I've looked up several ways of how to get manim to do images and some solutions, but since I'm pretty new at this I don't always understand the answers I've found from other people's issues or if it applies to mine. I keep getting this error response:

raise IOError("File {} not Found".format(file_name))
OSError: File shirt not Found

Any help is much appreciated.

{'base_commit': 'fc153bb49a529e8cbb02dd1514f06387cbf0ee6e', 'files': [{'path': 'manimlib/animation/fading.py', 'Loc': {"('FadeIn', None, 34)": {'mod': []}}, 'status': 'modified'}]}


What is VMobject exactly?

Can anyone explain what is the purpose of `VMobject` and how it differs from `Mobject`?

I am trying to make some `old_projects` work. For example, I had to change `PMobject` to inherit from `VMobject` instead of `Mobject` in order to fix `NumberLineScene`. I do not know if it is correct thing to do or how will it affect the other scripts because I am unable to find the fundamental differences between the two objects. The wiki does not explain a lot, so please tell some detailed information.

I dug commit histories and saw

> "Starting to vectorize all things"

 kind of commit messages when the `VMobject` class is added to the engine. What does it mean "Vectorize" in this context?

{'base_commit': '64c960041b5b9dcb0aac50019268a3bdf69d9563', 'files': [{'path': 'manimlib/mobject/types/vectorized_mobject.py', 'Loc': {}}]}


[Documentation]: Micro-agents

**What problem or use case are you trying to solve?**

Currently in the `openhands/agenthub/codeact_agent` directory, we have an implementation of micro agents, but this is not documented.

To do so, we can:
1. read the implementation of codeact agent
2. read an example microagent in `openhands/agenthub/codeact_agent/micro/github.md`
3. add documentation to `openhands/agenthub/codeact_agent/README.md`


Ollama support issue.

<!-- You MUST fill out this template. We will close issues that don't include enough information to reproduce -->
#### Describe the bug

When trying to configure OpenDevin to run with Ollama there are requests that are being sent to the ollama server like this:

![image](https://github.com/OpenDevin/OpenDevin/assets/76570167/1931e068-0341-429b-8c4e-0dd2da36f54c)

The post request should look like this:
`"POST /chat/completions HTTP/1.1"`

<!-- a short description of the problem -->

#### Setup and configuration
**Current version**:
<!-- run `git log -n 1` to see this -->
```bash
commit 5c640c99cafb3c718dad60f377f3a725a8bab1de (HEAD -> local-llm-flag, origin/main, origin/HEAD, main)
```

<!-- tell us everything about your environment -->
**My config.toml and environment vars** (be sure to redact API keys):
```toml
WORKSPACE_DIR="./workspace"
LLM_BASE_URL="http://localhost:8000"
LLM_MODEL="ollama/starcoder2:15b"
LLM_EMBEDDING_MODEL="ollama/starcoder2:15b"
```

**My model and agent** (you can see these settings in the UI):
* Model: ollama/starcoder2
* Agent: MonologueAgent

**Commands I ran to install and run OpenDevin**:
```
git clone ...
make build
make start-backend
make start-frontend
```

**Steps to Reproduce**:
1. In `opendevin/llm/llm.py` in `__init__` replace `self.model = model if model else DEFAULT_MODEL_NAME`  with `self.model_name = DEFAULT_MODEL_NAME`
2. Run your local model on litellm `litellm --model ollama/starcoder2:15b --port 8000`
3. Run `make build` then `make start-backend` and `make start-frontend`
4. Ask devin to do anything ex 'make a hello world script in python'
5. Observe 404 errors spammed in litellm server log

**Logs, error messages, and screenshots**:
This is a log from the backend server running from `make start-backend` steps 0-99 all look the same.
```
==============
STEP 99

PLAN:
please make a simple flask app that says hello world.
Traceback (most recent call last):
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 1436, in function_with_retries
    response = original_function(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 386, in _completion
    raise e
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 334, in _completion
    deployment = self.get_available_deployment(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 2313, in get_available_deployment
    raise ValueError(f"No healthy deployment available, passed model={model}")
ValueError: No healthy deployment available, passed model=ollama/starcoder2:15b

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/quimbo/OpenDevin/agenthub/monologue_agent/utils/monologue.py", line 31, in condense
    resp = llm.completion(messages=messages)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 328, in completion
    raise e
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 325, in completion
    response = self.function_with_fallbacks(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 1419, in function_with_fallbacks
    raise original_exception
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 1344, in function_with_fallbacks
    response = self.function_with_retries(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 1496, in function_with_retries
    raise e
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 1462, in function_with_retries
    response = original_function(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 386, in _completion
    raise e
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 334, in _completion
    deployment = self.get_available_deployment(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 2313, in get_available_deployment
    raise ValueError(f"No healthy deployment available, passed model={model}")
ValueError: No healthy deployment available, passed model=ollama/starcoder2:15b

ERROR:
Error condensing thoughts: No healthy deployment available, passed model=ollama/starcoder2:15b
Traceback (most recent call last):
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 1436, in function_with_retries
    response = original_function(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 386, in _completion
    raise e
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 334, in _completion
    deployment = self.get_available_deployment(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 2313, in get_available_deployment
    raise ValueError(f"No healthy deployment available, passed model={model}")
ValueError: No healthy deployment available, passed model=ollama/starcoder2:15b

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/quimbo/OpenDevin/agenthub/monologue_agent/utils/monologue.py", line 31, in condense
    resp = llm.completion(messages=messages)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 328, in completion
    raise e
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 325, in completion
    response = self.function_with_fallbacks(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 1419, in function_with_fallbacks
    raise original_exception
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 1344, in function_with_fallbacks
    response = self.function_with_retries(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 1496, in function_with_retries
    raise e
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 1462, in function_with_retries
    response = original_function(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 386, in _completion
    raise e
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 334, in _completion
    deployment = self.get_available_deployment(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/.local/share/virtualenvs/OpenDevin-thTG-Evv/lib/python3.11/site-packages/litellm/router.py", line 2313, in get_available_deployment
    raise ValueError(f"No healthy deployment available, passed model={model}")
ValueError: No healthy deployment available, passed model=ollama/starcoder2:15b

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/quimbo/OpenDevin/opendevin/controller/agent_controller.py", line 112, in step
    action = self.agent.step(self.state)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/quimbo/OpenDevin/agenthub/monologue_agent/agent.py", line 153, in step
    self._add_event(prev_action.to_dict())
  File "/home/quimbo/OpenDevin/agenthub/monologue_agent/agent.py", line 96, in _add_event
    self.monologue.condense(self.llm)
  File "/home/quimbo/OpenDevin/agenthub/monologue_agent/utils/monologue.py", line 36, in condense
    raise RuntimeError(f"Error condensing thoughts: {e}")
RuntimeError: Error condensing thoughts: No healthy deployment available, passed model=ollama/starcoder2:15b

OBSERVATION:
Error condensing thoughts: No healthy deployment available, passed model=ollama/starcoder2:15b
Exited before finishing
```

#### Additional Context

Litellm for local models is expecting api calls in the following format:

![image](https://github.com/OpenDevin/OpenDevin/assets/76570167/67b10c26-a9e6-44a1-a79e-908fc7d3749f)

From: `http://localhost:8000/#/`

I know that the problem is whatever is managing the api calls is set to call `/api/generate/` because this is the convention, but for local server that is not supported. I do not know where to look to fix this, any ideas?

The server responds when I test it like this:
```
def query_local_llm(prompt, limit=TOKEN_LIMIT):
    # Replace with your actual server address and port
    url = "http://0.0.0.0:8000/chat/completions"
    payload = {
        "model": "ollama/mistral",
        "messages" : [{"content": prompt, "role": "user"}],
        "max_tokens": limit
    }
    response = requests.post(url, json=payload)
```
![image](https://github.com/OpenDevin/OpenDevin/assets/76570167/b9bae877-5bd4-4864-b672-9678bb9a294e)

{'base_commit': '08a2dfb01af1aec6743f5e4c23507d63980726c0', 'files': [{'path': 'opendevin/llm/LOCAL_LLM_GUIDE.md', 'Loc': {}}]}


can LinkExtractor extract scrapy.link with node info

the html is like below, i want to extract the link `/example/category/pg{page}/`, but the `scrapy.link` does not contains the node info(`currentPage` and `totalPage`), how can i extract the link with the node info

``` html
<div class="page-box">
     <div page-url="/example/category/pg{page}/"
             totalPage="35"
             currentPage="1"
     </div>
</div>
```

{'base_commit': 'd636e5baa8a077e2869bfe3b76525efec42392ec', 'files': [{'path': 'scrapy/http/response/text.py', 'Loc': {"('TextResponse', 'css', 117)": {'mod': []}}, 'status': 'modified'}]}


version : Scrapy 2.1.0

```
2020-05-11 20:05:28 [scrapy.core.engine] INFO: Spider opened
2020-05-11 20:05:28 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2020-05-11 20:05:28 [dy] INFO: Spider opened: dy
2020-05-11 20:05:28 [scrapy.utils.signal] ERROR: Error caught on signal handler: <bound method MemoryUsage.engine_started of <scrapy.extensions.memusage.MemoryUsage object at 0x0000000004D3A358>>
Traceback (most recent call last):
  File "D:\microsoft\python37\lib\site-packages\scrapy\utils\defer.py", line 161, in maybeDeferred_coro
    result = f(*args, **kw)
  File "D:\microsoft\python37\lib\site-packages\pydispatch\robustapply.py", line 55, in robustApply
    return receiver(*arguments, **named)
  File "D:\microsoft\python37\lib\site-packages\scrapy\extensions\memusage.py", line 55, in engine_started
    self.crawler.stats.set_value('memusage/startup', self.get_virtual_size())
  File "D:\microsoft\python37\lib\site-packages\scrapy\extensions\memusage.py", line 48, in get_virtual_size
    size = self.resource.getrusage(self.resource.RUSAGE_SELF).ru_maxrss
AttributeError: module 'resource' has no attribute 'getrusage'
```

```
2020-05-11 20:05:43 [scrapy.core.engine] INFO: Closing spider (finished)
2020-05-11 20:05:43 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{'downloader/request_bytes': 6751,
 'downloader/request_count': 14,
 'downloader/request_method_count/GET': 14,
 'downloader/response_bytes': 12380415,
 'downloader/response_count': 14,
 'downloader/response_status_count/200': 10,
 'downloader/response_status_count/302': 4,
 'elapsed_time_seconds': 14.631021,
 'finish_reason': 'finished',
 'finish_time': datetime.datetime(2020, 5, 11, 12, 5, 43, 378200),
 'item_scraped_count': 65,
 'log_count/DEBUG': 85,
 'log_count/ERROR': 1,
 'log_count/INFO': 9,
 'request_depth_max': 1,
 'response_received_count': 10,
 'scheduler/dequeued': 6,
 'scheduler/dequeued/memory': 6,
 'scheduler/enqueued': 6,
 'scheduler/enqueued/memory': 6,
 'start_time': datetime.datetime(2020, 5, 11, 12, 5, 28, 747179)}
2020-05-11 20:05:43 [scrapy.core.engine] INFO: Spider closed (finished)
2020-05-11 20:05:43 [scrapy.utils.signal] ERROR: Error caught on signal handler: <bound method MemoryUsage.engine_stopped of <scrapy.extensions.memusage.MemoryUsage object at 0x0000000004D3A358>>
Traceback (most recent call last):
  File "D:\microsoft\python37\lib\site-packages\scrapy\utils\defer.py", line 161, in maybeDeferred_coro
    result = f(*args, **kw)
  File "D:\microsoft\python37\lib\site-packages\pydispatch\robustapply.py", line 55, in robustApply
    return receiver(*arguments, **named)
  File "D:\microsoft\python37\lib\site-packages\scrapy\extensions\memusage.py", line 70, in engine_stopped
    for tsk in self.tasks:
AttributeError: 'MemoryUsage' object has no attribute 'tasks'
```

(edited for text formatting)

{'base_commit': '892467cb8a40c54840284a08d0f98ab1b3af7bc4', 'files': [{'path': 'scrapy/commands/settings.py', 'Loc': {}}]}


2023 Ford Maverick Not Recognized

### Describe the bug

Car Not Recognized

Looks like all the values for firmware are the same as what is already in values.py

### Which car does this affect?

Ford Maverick 2023

### Provide a route where the issue occurs

66833387c2bbbca0|2023-09-27--21-13-05

### openpilot version

master-ci

### Additional info

`{'carParams': {'alternativeExperience': 1,
               'autoResumeSng': True,
               'carFingerprint': 'mock',
               'carFw': [{'address': 2016,
                          'brand': 'ford',
                          'bus': 1,
                          'ecu': 'engine',
                          'fwVersion': b'PZ6A-14C204-JE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 2024,
                          'subAddress': 0},
                         {'address': 1840,
                          'brand': 'ford',
                          'bus': 0,
                          'ecu': 'eps',
                          'fwVersion': b'NZ6C-14D003-AL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 1848,
                          'subAddress': 0},
                         {'address': 1888,
                          'brand': 'ford',
                          'bus': 0,
                          'ecu': 'abs',
                          'fwVersion': b'PZ6C-2D053-ED\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 1896,
                          'subAddress': 0},
                         {'address': 1798,
                          'brand': 'ford',
                          'bus': 0,
                          'ecu': 'fwdCamera',
                          'fwVersion': b'NZ6T-14F397-AC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 1806,
                          'subAddress': 0},
                         {'address': 1842,
                          'brand': 'ford',
                          'bus': 0,
                          'ecu': 'shiftByWire',
                          'fwVersion': b'NZ6P-14G395-AD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': True,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 1850,
                          'subAddress': 0},
                         {'address': 1892,
                          'brand': 'ford',
                          'bus': 0,
                          'ecu': 'fwdRadar',
                          'fwVersion': b'NZ6T-14D049-AA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 1900,
                          'subAddress': 0},
                         {'address': 2016,
                          'brand': 'mazda',
                          'bus': 1,
                          'ecu': 'engine',
                          'fwVersion': b'PZ6A-14C204-JE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'"\xf1\x88'],
                          'responseAddress': 2024,
                          'subAddress': 0},
                         {'address': 1840,
                          'brand': 'mazda',
                          'bus': 0,
                          'ecu': 'eps',
                          'fwVersion': b'NZ6C-14D003-AL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': True,
                          'obdMultiplexing': True,
                          'request': [b'"\xf1\x88'],
                          'responseAddress': 1848,
                          'subAddress': 0},
                         {'address': 1888,
                          'brand': 'mazda',
                          'bus': 0,
                          'ecu': 'abs',
                          'fwVersion': b'PZ6C-2D053-ED\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': True,
                          'obdMultiplexing': True,
                          'request': [b'"\xf1\x88'],
                          'responseAddress': 1896,
                          'subAddress': 0},
                         {'address': 1798,
                          'brand': 'mazda',
                          'bus': 0,
                          'ecu': 'fwdCamera',
                          'fwVersion': b'NZ6T-14F397-AC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': True,
                          'obdMultiplexing': True,
                          'request': [b'"\xf1\x88'],
                          'responseAddress': 1806,
                          'subAddress': 0},
                         {'address': 1892,
                          'brand': 'mazda',
                          'bus': 0,
                          'ecu': 'fwdRadar',
                          'fwVersion': b'NZ6T-14D049-AA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': True,
                          'obdMultiplexing': True,
                          'request': [b'"\xf1\x88'],
                          'responseAddress': 1900,
                          'subAddress': 0}],
               'carName': 'mock',
               'carVin': '3FTTW8E31PRA79783',
               'centerToFront': 1.350000023841858,
               'communityFeatureDEPRECATED': False,
               'dashcamOnly': False,
               'directAccelControlDEPRECATED': False,
               'enableApgsDEPRECATED': False,
               'enableBsm': False,
               'enableCameraDEPRECATED': False,
               'enableDsu': False,
               'enableGasInterceptor': False,
               'experimentalLongitudinalAvailable': False,
               'fingerprintSource': 'can',
               'flags': 0,
               'fuzzyFingerprint': False,
               'hasStockCameraDEPRECATED': False,
               'isPandaBlackDEPRECATED': False,
               'lateralTuning': {'pid': {'kf': 0.0}},
               'longitudinalActuatorDelayLowerBound': 0.15000000596046448,
               'longitudinalActuatorDelayUpperBound': 0.15000000596046448,
               'longitudinalTuning': {'deadzoneBP': [0.0], 'deadzoneV': [0.0], 'kf': 1.0, 'kiBP': [0.0], 'kiV': [1.0], 'kpBP': [0.0], 'kpV': [1.0]},
               'mass': 1836.0,
               'maxLateralAccel': 10.0,
               'maxSteeringAngleDegDEPRECATED': 0.0,
               'minEnableSpeed': -1.0,
               'minSpeedCanDEPRECATED': 0.0,
               'minSteerSpeed': 0.0,
               'networkLocation': 'fwdCamera',
               'notCar': False,
               'openpilotLongitudinalControl': False,
               'pcmCruise': True,
               'radarTimeStep': 0.05000000074505806,
               'radarUnavailable': False,
               'rotationalInertia': 3139.534912109375,
               'safetyConfigs': [{'safetyModel': 'noOutput', 'safetyParam': 0, 'safetyParam2DEPRECATED': 0, 'safetyParamDEPRECATED': 0}],
               'safetyModelDEPRECATED': 'silent',
               'safetyModelPassiveDEPRECATED': 'silent',
               'safetyParamDEPRECATED': 0,
               'startAccel': 0.0,
               'startingAccelRateDEPRECATED': 0.0,
               'startingState': False,
               'steerActuatorDelay': 0.0,
               'steerControlType': 'torque',
               'steerLimitAlert': False,
               'steerLimitTimer': 1.0,
               'steerRateCostDEPRECATED': 0.0,
               'steerRatio': 13.0,
               'steerRatioRear': 0.0,
               'stopAccel': -2.0,
               'stoppingControl': True,
               'stoppingDecelRate': 0.800000011920929,
               'tireStiffnessFactor': 1.0,
               'tireStiffnessFront': 201087.203125,
               'tireStiffnessRear': 317877.90625,
               'transmissionType': 'unknown',
               'vEgoStarting': 0.5,
               'vEgoStopping': 0.5,
               'wheelSpeedFactor': 1.0,
               'wheelbase': 2.700000047683716},
 'logMonoTime': 971923210573,
 'valid': True}
{'carParams': {'alternativeExperience': 1,
               'autoResumeSng': True,
               'carFingerprint': 'mock',
               'carFw': [{'address': 2016,
                          'brand': 'ford',
                          'bus': 1,
                          'ecu': 'engine',
                          'fwVersion': b'PZ6A-14C204-JE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 2024,
                          'subAddress': 0},
                         {'address': 1840,
                          'brand': 'ford',
                          'bus': 0,
                          'ecu': 'eps',
                          'fwVersion': b'NZ6C-14D003-AL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 1848,
                          'subAddress': 0},
                         {'address': 1888,
                          'brand': 'ford',
                          'bus': 0,
                          'ecu': 'abs',
                          'fwVersion': b'PZ6C-2D053-ED\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 1896,
                          'subAddress': 0},
                         {'address': 1798,
                          'brand': 'ford',
                          'bus': 0,
                          'ecu': 'fwdCamera',
                          'fwVersion': b'NZ6T-14F397-AC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 1806,
                          'subAddress': 0},
                         {'address': 1842,
                          'brand': 'ford',
                          'bus': 0,
                          'ecu': 'shiftByWire',
                          'fwVersion': b'NZ6P-14G395-AD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': True,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 1850,
                          'subAddress': 0},
                         {'address': 1892,
                          'brand': 'ford',
                          'bus': 0,
                          'ecu': 'fwdRadar',
                          'fwVersion': b'NZ6T-14D049-AA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'>\x00', b'"\xf1\x88'],
                          'responseAddress': 1900,
                          'subAddress': 0},
                         {'address': 2016,
                          'brand': 'mazda',
                          'bus': 1,
                          'ecu': 'engine',
                          'fwVersion': b'PZ6A-14C204-JE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': False,
                          'obdMultiplexing': True,
                          'request': [b'"\xf1\x88'],
                          'responseAddress': 2024,
                          'subAddress': 0},
                         {'address': 1840,
                          'brand': 'mazda',
                          'bus': 0,
                          'ecu': 'eps',
                          'fwVersion': b'NZ6C-14D003-AL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': True,
                          'obdMultiplexing': True,
                          'request': [b'"\xf1\x88'],
                          'responseAddress': 1848,
                          'subAddress': 0},
                         {'address': 1888,
                          'brand': 'mazda',
                          'bus': 0,
                          'ecu': 'abs',
                          'fwVersion': b'PZ6C-2D053-ED\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': True,
                          'obdMultiplexing': True,
                          'request': [b'"\xf1\x88'],
                          'responseAddress': 1896,
                          'subAddress': 0},
                         {'address': 1798,
                          'brand': 'mazda',
                          'bus': 0,
                          'ecu': 'fwdCamera',
                          'fwVersion': b'NZ6T-14F397-AC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': True,
                          'obdMultiplexing': True,
                          'request': [b'"\xf1\x88'],
                          'responseAddress': 1806,
                          'subAddress': 0},
                         {'address': 1892,
                          'brand': 'mazda',
                          'bus': 0,
                          'ecu': 'fwdRadar',
                          'fwVersion': b'NZ6T-14D049-AA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
                          'logging': True,
                          'obdMultiplexing': True,
                          'request': [b'"\xf1\x88'],
                          'responseAddress': 1900,
                          'subAddress': 0}],
               'carName': 'mock',
               'carVin': '3FTTW8E31PRA79783',
               'centerToFront': 1.350000023841858,
               'communityFeatureDEPRECATED': False,
               'dashcamOnly': False,
               'directAccelControlDEPRECATED': False,
               'enableApgsDEPRECATED': False,
               'enableBsm': False,
               'enableCameraDEPRECATED': False,
               'enableDsu': False,
               'enableGasInterceptor': False,
               'experimentalLongitudinalAvailable': False,
               'fingerprintSource': 'can',
               'flags': 0,
               'fuzzyFingerprint': False,
               'hasStockCameraDEPRECATED': False,
               'isPandaBlackDEPRECATED': False,
               'lateralTuning': {'pid': {'kf': 0.0}},
               'longitudinalActuatorDelayLowerBound': 0.15000000596046448,
               'longitudinalActuatorDelayUpperBound': 0.15000000596046448,
               'longitudinalTuning': {'deadzoneBP': [0.0], 'deadzoneV': [0.0], 'kf': 1.0, 'kiBP': [0.0], 'kiV': [1.0], 'kpBP': [0.0], 'kpV': [1.0]},
               'mass': 1836.0,
               'maxLateralAccel': 10.0,
               'maxSteeringAngleDegDEPRECATED': 0.0,
               'minEnableSpeed': -1.0,
               'minSpeedCanDEPRECATED': 0.0,
               'minSteerSpeed': 0.0,
               'networkLocation': 'fwdCamera',
               'notCar': False,
               'openpilotLongitudinalControl': False,
               'pcmCruise': True,
               'radarTimeStep': 0.05000000074505806,
               'radarUnavailable': False,
               'rotationalInertia': 3139.534912109375,
               'safetyConfigs': [{'safetyModel': 'noOutput', 'safetyParam': 0, 'safetyParam2DEPRECATED': 0, 'safetyParamDEPRECATED': 0}],
               'safetyModelDEPRECATED': 'silent',
               'safetyModelPassiveDEPRECATED': 'silent',
               'safetyParamDEPRECATED': 0,
               'startAccel': 0.0,
               'startingAccelRateDEPRECATED': 0.0,
               'startingState': False,
               'steerActuatorDelay': 0.0,
               'steerControlType': 'torque',
               'steerLimitAlert': False,
               'steerLimitTimer': 1.0,
               'steerRateCostDEPRECATED': 0.0,
               'steerRatio': 13.0,
               'steerRatioRear': 0.0,
               'stopAccel': -2.0,
               'stoppingControl': True,
               'stoppingDecelRate': 0.800000011920929,
               'tireStiffnessFactor': 1.0,
               'tireStiffnessFront': 201087.203125,
               'tireStiffnessRear': 317877.90625,
               'transmissionType': 'unknown',
               'vEgoStarting': 0.5,
               'vEgoStopping': 0.5,
               'wheelSpeedFactor': 1.0,
               'wheelbase': 2.700000047683716},
 'logMonoTime': 1021914306894,
 'valid': True}`


Content marked as consumed in 0.13.6

Content is immediately marked as consumed in 0.13.6, causing calls to e.g. response.iter_content() to throw an error.

Test code (tested with python 2.6):

```
import requests

r = requests.get('http://docs.python-requests.org/')
if r._content_consumed:
    print 'consumed'
else:
    print 'not consumed'
```

In 0.13.5 this prints:
not consumed

In 0.13.6 this prints:
consumed

{'base_commit': '27b55a74d7b9bd2f8c60fd0ee342bcbbf40e0a66', 'files': [{'path': 'requests/models.py', 'Loc': {"('Request', '__init__', 47)": {'mod': [62]}}, 'status': 'modified'}]}


Chunk-encoded request doesn't recognize iter_content generator

Passing a generator created by iter_content() as request data raises "TypeError: sendall() argument 1 must be string or buffer, not generator".

## Expected Result

The POST request successfully delives the content from the GET request.

## Actual Result

A TypeError is raised:
```
Traceback (most recent call last):
  File "..\test.py", line 7, in <module>
    PostForward("http://myhost/img/foo.png", "http://myotherhost/convert")
  File "..\test.py", line 6, in PostForward
    return requests.post(url=dst, data=data, headers={'Content-Length': length})
  File "C:\Python27\lib\site-packages\requests\api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "C:\Python27\lib\site-packages\requests\api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "C:\Python27\lib\site-packages\requests\adapters.py", line 440, in send
    timeout=timeout
  File "C:\Python27\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "C:\Python27\lib\site-packages\urllib3\connectionpool.py", line 357, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "C:\Python27\lib\httplib.py", line 1042, in request
    self._send_request(method, url, body, headers)
  File "C:\Python27\lib\httplib.py", line 1082, in _send_request
    self.endheaders(body)
  File "C:\Python27\lib\httplib.py", line 1038, in endheaders
    self._send_output(message_body)
  File "C:\Python27\lib\httplib.py", line 886, in _send_output
    self.send(message_body)
  File "C:\Python27\lib\httplib.py", line 858, in send
    self.sock.sendall(data)
  File "C:\Python27\lib\socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
TypeError: sendall() argument 1 must be string or buffer, not generator
```

## Reproduction Steps

```python
import requests
def PostForward(src, dst):
	with requests.get(url=src, stream=True) as srcResponse:
		length = srcResponse.headers['Content-Length']
		data = srcResponse.iter_content(1024)
		return requests.post(url=dst, data=data, headers={'Content-Length': length})
PostForward("http://myhost/img/foo.png", "http://myotherhost/convert")
```

## System Information

    $ python -m requests.help

```
{
  "chardet": {
    "version": "3.0.4"
  },
  "cryptography": {
    "version": ""
  },
  "idna": {
    "version": "2.6"
  },
  "implementation": {
    "name": "CPython",
    "version": "2.7.14"
  },
  "platform": {
    "release": "10",
    "system": "Windows"
  },
  "pyOpenSSL": {
    "openssl_version": "",
    "version": null
  },
  "requests": {
    "version": "2.18.4"
  },
  "system_ssl": {
    "version": "100020bf"
  },
  "urllib3": {
    "version": "1.22"
  },
  "using_pyopenssl": false
}
```


[WinError 10048] Only one usage of each socket address ...

I notice that despite using requests.Session() - I still seem to be creating new connections/sockets which eventually exhaust (TIME_WAIT) and I get the following error:

> [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted',))

```
s = requests.Session()
data = zip(url_routes, cycle(s))
calc_routes = pool.map(processRequest, data)

```

I posted a bit more [here](http://stackoverflow.com/questions/35793908/python-multiprocessing-associate-a-process-with-a-session), however not sure how to address this


File download weirdness

I noticed this issue building conda recipes.  Conda uses requests to download files from the internet.

The file that is being fetched is: https://dakota.sandia.gov/sites/default/files/distributions/public/dakota-6.5-public.src.tar.gz
(link found here: https://dakota.sandia.gov/download.html)

Downloading with curl -O
filesize: 78MB
md5: 02c46e904d40bba6b308065db34c1ad7

Downloading with urllib2 (from the standard library):
filesize: 78MB
md5: 02c46e904d40bba6b308065db34c1ad7

Downloading with requests-2.12.1 (supplied with conda)
filesize: 248MB
md5: 41e4268140d850756812510512d8eee8
tar -tf doesn't indicate any corruption.

I'm not sure what is different with this particular URL, but the other  files I tried with requests worked.  I don't know where the extra 170MB is coming from?

code used to download files:
```python
def download_file(url, fn):
    r = requests.get(url, stream=True)
    with open(fn, 'wb') as f:
        for chunk in r.iter_content(chunk_size=1024):
            if chunk:
                f.write(chunk)

def download_urllib2(url, fn):
    f = urllib2.urlopen(url)
    with open(fn, 'wb') as fh:
        for x in iter(lambda: f.read(1024), b''):
            fh.write(x)
```


```python
import requests

requests.get('http://gett.bike/')
```
This code raises the following exception:
```python
ContentDecodingError: ('Received response with content-encoding: gzip, but failed to decode it.',
error('Error -3 while decompressing data: incorrect data check',))
```
Arch linux x64
requests==2.13.0
python=3.6.0


Ability to set timeout after response

For devs who use this great library, it would be very beneficial to be able to set the timeout AFTER initial connection. There are a few scenarios where this is useful but one of the main patterns/use cases is this:

```

import requests
import socket

# May or may not subclass threading.Thread
class Getter(object):
    def __init__(self):
        self.request = requests.get(url, stream=True)

    def run(self):
        with open(path, 'r+b') as file:

            bytes_consumed = 0
            while True:
                try:

                    chunk = self.request.raw.read(size)
                    if not chunk:
                        break
                    chunk_length = len(chunk)

                    file.write(chunk)
                    bytes_consumed += chunk_length

                except socket.timeout:
                    # handle incomplete download by using range header next time, etc.
```

Handling incomplete downloads due to connection loss is common and especially important when downloading large or many files (or both). As you can see, this can be achieved in a fairly straightforward way. The issue is there is really no good way to write tests for this. Each method would involve OS specific code which would also be a no-go for CI services.

What would be an option is the ability to set the timeout after establishing a connection. This way in a test you could do "r.timeout = (None, 0.00001)" and during reading it would simulate a timeout.

To my knowledge this is no way currently to inject a new Timeout class retroactively. Is this correct?


bad handshake error with ssl3

I have an inhouse IIS server with ssl3 but an expired certificate, so I used requests without certificate verification and it was working fine with requests 2.11.1. But after I upgrade requests to 2.12.0, there was an error occured.

the code is:
...
requests.get('https://10.192.8.89:8080/yps_report', verify=False)
...

error message:
Traceback (most recent call last):
  File "c:\python35\lib\site-packages\requests\packages\urllib3\contrib\pyopenssl.py", line 417, in wrap_socket
    cnx.do_handshake()
  File "c:\python35\lib\site-packages\OpenSSL\SSL.py", line 1426, in do_handshake
    self._raise_ssl_error(self._ssl, result)
  File "c:\python35\lib\site-packages\OpenSSL\SSL.py", line 1167, in _raise_ssl_error
    raise SysCallError(-1, "Unexpected EOF")
OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python35\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 594, in urlopen
    chunked=chunked)
  File "c:\python35\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 350, in _make_request
    self._validate_conn(conn)
  File "c:\python35\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 835, in _validate_conn
    conn.connect()
  File "c:\python35\lib\site-packages\requests\packages\urllib3\connection.py", line 323, in connect
    ssl_context=context)
  File "c:\python35\lib\site-packages\requests\packages\urllib3\util\ssl_.py", line 324, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "c:\python35\lib\site-packages\requests\packages\urllib3\contrib\pyopenssl.py", line 424, in wrap_socket
    raise ssl.SSLError('bad handshake: %r' % e)
ssl.SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",)
...

I tried  to downgrade requests to 2.11.1 and the error was gone. I have no idea how to fix this.
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.ssl_ import create_urllib3_context

# This is the 2.11 Requests cipher string.
CIPHERS = (
    'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:'
    'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:'
    '!eNULL:!MD5'
)

class DESAdapter(HTTPAdapter):
    def init_poolmanager(self, *args, **kwargs):
        context = create_urllib3_context(ciphers=CIPHERS)
        kwargs['ssl_context'] = context
        return super(HTTPAdapter, self).init_poolmanager(*args, **kwargs)

s = requests.Session()
s.mount('https://10.192.8.89', DESAdapter())

3
需要将下面的user的一个comment中user的代码放入其中


### Summary

When trying to pass a variable called i.e. sysctl.values to loop, I will get the above error.

### Issue Type

Bug Report

### Component Name

debug (only used for debugging)

### Ansible Version

```console
$ ansible --version
ansible 2.9.27
  config file = /home/rf/.ansible.cfg
  configured module search path = ['/home/rf/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.10.6 (main, Aug  2 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)]
```

### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all

[I] </m/d/playground>-2-> ansible-config dump --only-changed
ANSIBLE_PIPELINING(/home/rf/.ansible.cfg) = True
ANSIBLE_SSH_ARGS(/home/rf/.ansible.cfg) = -o ControlMaster=auto -o ControlPersist=60s
DEFAULT_FORKS(/home/rf/.ansible.cfg) = 50
DEFAULT_HOST_LIST(/home/rf/.ansible.cfg) = ['/home/rf/hosts']
INVENTORY_CACHE_ENABLED(/home/rf/.ansible.cfg) = True
```

### OS / Environment

Fedora 36

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: Test
  hosts: localhost
  gather_facts: True
  tasks:
    - debug:
        msg: "{{ item }}"
      loop: "{{ sysctl2 }}"
    - debug:
        msg: "{{ item }}"
      loop: "{{ sysctl.values }}"
  vars:
    sysctl:
      values:
        - { name: "net.ipv4.ip_forward", value: "1" }
    sysctl2:
        - { name: "net.ipv4.ip_forward", value: "1" }
```

### Expected Results

Output of debug using sysctl.values

### Actual Results

```console
PLAY [Test] ********************************************************************************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************************************************************************
ok: [localhost]

TASK [debug] *******************************************************************************************************************************************************************************************
ok: [localhost] => (item={'name': 'net.ipv4.ip_forward', 'value': '1'}) => {
    "msg": {
        "name": "net.ipv4.ip_forward",
        "value": "1"
    }
}

TASK [debug] *******************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "Invalid data passed to 'loop', it requires a list, got this instead: <built-in method values of dict object at 0x7f63b782bf80>. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup."}

PLAY RECAP *********************************************************************************************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
```
```

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Ansible core 2.16.1 broke AnsibleUnsafeBytes iteration

### Summary

Upgrading form 2.16.0 to 2.16.1 (Ansible 9.0.1 to 9.1.0), iterating over AnsibleUnsafeBytes does not create a list of numbers anymore.

### Issue Type

Bug Report

### Component Name

core, unsafe_proxy

### Ansible Version

```console
$ ansible --version

ansible [core 2.16.1]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.12/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.12.0 (main, Nov 29 2023, 03:32:06) [GCC 10.2.1 20210110] (/usr/local/bin/python)
  jinja version = 3.1.2
  libyaml = True
```

### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all

/bin/sh: 1: less: not found
```

(sorry, dockerized environment)

### OS / Environment

Debian bullseye / 11 (in python docker image: `python:3.12.0-bullseye`), ansible via pip (`ansible==9.1.0`)

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```py
from ansible.utils.unsafe_proxy import AnsibleUnsafeText
x = AnsibleUnsafeText("asdf")
y = x.encode("utf8")
list(y)
```

### Expected Results

```
[97, 115, 100, 102]
```

This is what happens on 2.16.0.

### Actual Results

```console
[b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00']
```

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


docker_container task fail on exit code

Unless i'm missing something i expect that if I were to do something like the following the task would fail? But it does not 😟

```yaml
  tasks:
      docker_container:
        name: "exit-test"
        image: "ubuntu:latest"
        command: "bash -c 'exit 123'"
```

##### ISSUE TYPE
 - Bug Report

##### COMPONENT NAME
docker_container

##### ANSIBLE VERSION
```
2.1.1.0
```

##### OS / ENVIRONMENT
N/A

##### STEPS TO REPRODUCE
```yaml
  tasks:
      docker_container:
        name: "exit-test"
        image: "ubuntu:latest"
        command: "bash -c 'exit 123'"
```
##### EXPECTED RESULTS
Should fail the task

##### ACTUAL RESULTS
Task is ok.


affects_2.0
module
support:core
bug
files

Template update convert \n to actual new line

##### ISSUE TYPE

    Bug Report

##### COMPONENT NAME

template

##### ANSIBLE VERSION

2.0 and higher
CONFIGURATION
```
[ssh_connection]
control_path = %(directory)s/%%C
```
##### OS / ENVIRONMENT

Mac OS X 10.11.6
Centos 6.x, 7.x
SUMMARY

In the input .j2 file, we substitute a variable with an environment variable that has a line/string that contains a grok expression containing `(?m)\n` . The output generated by the template module in versions 2.0 and later, treats the \n as actual line break. Where as versions up to 1.9.6 retains the literal `(?m)\n` without replacing the \n with an actual line break. We see the line break after we upgraded the Ansible version to 2.x.

Any way we can work around this issue? Thank you for your help.
##### STEPS TO REPRODUCE

Our execution flow is probably not the nicest - we want to reengineer it soon. Basic steps:

    Run a shell script with ansible-playbook command that pass in an env variable with `(?m)\n` literal.
    Playbook calls a main yaml file and assigns shell environment var to a included task yaml file.
    The task yaml file invokes the template module.

In the snippet below I stripped out other lines/vars for clarity.

main shell
```
set GROK_PATTERN_GENERAL_ERROR_PG="%{TIMESTAMP_ISO8601} ERROR \[%{USER:handlerName}\] %{USER:className}%{GREEDYDATA:errorline1}((?m)\n%{USER:logerror}%{GREEDYDATA})"
```
```
ansible-playbook -i ../common/host.inventory \
                -${VERBOSE} \
                t.yml \
                ${CHECK_ONLY} \
                --extra-vars "hosts='${HOST}'
                              xlogstash_grok_general_error='${GROK_PATTERN_GENERAL_ERROR_PG}'
                             "
```
t.yml
```
---
- hosts: 127.0.0.1
  connection: local

  tasks:
    - include_vars: ../common/defaults/main.yml
    - name: generate logstash kafka logscan filter config file
      include: tasks/t.yml
      vars:
          logstash_grok_general_error: "{{xlogstash_grok_general_error}}"
```
tasks/t.yml
```
---
    - name: generate logstash kafka logscan filter config file
      template: src=../common/templates/my.conf.j2
                dest="./500-filter.conf"
```
my.conf.j2
```
        grok {
                break_on_match => "true"
                match => [
                        "message", "{{logstash_grok_general_error}}"
                ]
        }
```
Note the `(?m)\n` are still on the same line.
##### EXPECTED RESULTS
```
        grok {
                break_on_match => "true"
                match => [
                        "message", "%{TIMESTAMP_ISO8601} ERROR \[%{USER:handlerName}\] %{USER:className}%{GREEDYDATA:errorline1}((?m)\n%{USER:logerror}%{GREEDYDATA})"
                ]
        }
```
##### ACTUAL RESULTS

Note `(?m)\n` now has the `\n` as actual line break.
```
        grok {
                break_on_match => "true"
                match => [
                        "message", "%{TIMESTAMP_ISO8601} ERROR \[%{USER:handlerName}\] %{USER:className}%{GREEDYDATA:errorline1}((?m)
%{USER:logerror}%{GREEDYDATA})"
                ]
        }
```


python3
module
support:core
bug
affects_2.10

cron: Remove/delete an environment variable

### Summary

With `env=yes`, `cron` add environment variable (with the `name` & `value`) parameters.
I though that having `env` + `state=absent` would remove said variable, but that's not the case (the cron file is actually removed).
As such there is no way to remove a variable and the more obvious way to attempt to do it results in a surprising result.

### Issue Type

Bug Report

### Component Name

ansible.builtin.cron

### Ansible Version

```console
$ ansible --version
ansible 2.10.5
  config file = /home/user/.ansible.cfg
  configured module search path = ['/usr/share/ansible']
  ansible python module location = /home/user/.local/lib/python3.8/site-packages/ansible
  executable location = /home/user/.local/bin/ansible
  python version = 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]

```

### Configuration

```console (paste below)
$ ansible-config dump --only-changed

```

### OS / Environment

Ubuntu 20.04

### Steps to Reproduce

```yaml
  cron:
    cron_file: foobar
    user: root
    env: yes
    name: "VAR"
    value: "False"
    state: absent
```

### Expected Results

The "VAR" variable is removed from /etc/cron.d/foobar

### Actual Results

/etc/cron.d/foobar is removed.
There is no way to remove the "VAR" variable.

{'base_commit': 'a29fcfa9952ff40e389a5e93c880bc2a23e3f2e7', 'files': [{'path': 'lib/ansible/modules/cron.py', 'Loc': {'(None, None, None)': {'mod': [15]}}, 'status': 'modified'}]}


affects_2.0
affects_2.3
c:executor/playbook_executor
support:core
feature
P3

enable do/until with async tasks

##### ISSUE TYPE
Feature Idea

##### COMPONENT NAME
core

##### ANSIBLE VERSION
2.0

##### CONFIGURATION

##### OS / ENVIRONMENT

##### SUMMARY
When a task is marked as async, there is no way to loop until a condition is met.
With poll:0 and async_status you can poll for async task to complete but you cannot repeat the original async task itself until a condition is met.

```
cat /tmp/async-test.yml

---
# Run through the test of an async command

- hosts: all
  tasks:
    - name: "Check an async command"
      command: /bin/sleep 3
      async: 5
      poll: 1
      register: command_result
      until: command_result.failed
      retries: 5
      delay: 10
```

```
$ansible-playbook -i localhost, /tmp/async-test.yml
 ____________
< PLAY [all] >
 ------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

 _________________
< GATHERING FACTS >
 -----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

ok: [localhost]
 ______________________________
< TASK: Check an async command >
 ------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

fatal: [localhost] => error while evaluating conditional: command_result.failed: {% if command_result.failed %} True {% else %} False {% endif %}

FATAL: all hosts have already failed -- aborting
 ____________
< PLAY RECAP >
 ------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

           to retry, use: --limit @/opt/ashishkh/async-test.retry

localhost                  : ok=1    changed=0    unreachable=2    failed=0
```

##### STEPS TO REPRODUCE

##### EXPECTED RESULTS

##### ACTUAL RESULTS