使用阿里的ocr服务,是否需要在配置里面加入OCR_ACCESS_KEY_ID和OCR_ACCESS_KEY_SECRET

オープン
#263 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

  • #277 @JiwaniZakir による — マージされずにクローズ

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
50/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
documentation

調査の方向性

The OCR credentials are consumed in PCAgent/text_localization.py. Check how the Alibaba Cloud client is initialized there and what config keys it expects, then update the project documentation or config.example.json to list OCR_ACCESS_KEY_ID and OCR_ACCESS_KEY_SECRET as required for the OCR feature. Note that linked PR #277 was closed without merging, so review it before starting.

索引モデルが issue の本文から書いたものです。

説明

执行:python run.py --instruction="Open Chrome and search the PC-Agent paper." --mac 1
报错:缺失了OCR_ACCESS_KEY_ID配置

之后,我在config.json中增加了OCR_ACCESS_KEY_ID, OCR_ACCESS_KEY_SECRET。开通了OCR服务,并通过阿里云平台验证这两个参数可以解析图片。

但运行python run.py --instruction="Open Chrome and search the PC-Agent paper." --mac 1,依然连接不上,是还有什么配置问题吗?

task_1/screenshot_1.png
Traceback (most recent call last):
File "/Users/lisun/workplace/MobileAgent/PC-Agent/PCAgent/text_localization.py", line 62, in ocr
outputs = Sample.main(image)
File "/Users/lisun/workplace/MobileAgent/PC-Agent/PCAgent/text_localization.py", line 33, in main
output = client.recognize_all_text_with_options(recognize_all_text_request, runtime)
File "/Users/lisun/workplace/MobileAgent/PC-Agent/.venv/lib/python3.10/site-packages/alibabacloud_ocr_api20210707/client.py", line 354, in recognize_all_text_with_options
self.call_api(params, req, runtime)
File "/Users/lisun/workplace/MobileAgent/PC-Agent/.venv/lib/python3.10/site-packages/alibabacloud_tea_openapi/client.py", line 2015, in call_api
return self.do_request(params, request, runtime)
File "/Users/lisun/workplace/MobileAgent/PC-Agent/.venv/lib/python3.10/site-packages/alibabacloud_tea_openapi/client.py", line 1492, in do_request
raise UnretryableException(_last_request, _last_exception)
Tea.exceptions.UnretryableException: ('Connection aborted.', TimeoutError('The write operation timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/lisun/workplace/MobileAgent/PC-Agent/run.py", line 647, in
perception_infos, width, height = get_perception_infos(screenshot_file, screenshot_som_file, font_path=args.font_path)
File "/Users/lisun/workplace/MobileAgent/PC-Agent/run.py", line 335, in get_perception_infos
sub_text, sub_coordinates = ocr(img) # for api
File "/Users/lisun/workplace/MobileAgent/PC-Agent/PCAgent/text_localization.py", line 64, in ocr
raise OCRError(e.message)
PCAgent.text_localization.OCRError: RetryError("('Connection aborted.', TimeoutError('The write operation timed out'))")

主要言語
Python
スター
9.3k
フォーク
928
平均マージ
1日 2時間
マージ済み PR(30日)
3

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

X-PLUG/MobileAgent のほかの issue

X-PLUG/MobileAgent の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。