ComputerVisionClient Error or Bug - ReadInStreamAsync method: 'Invalid URI format' in Xamarin.Forms
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- csharp
調査の方向性
この issue ではリポジトリのファイルもテストも指定されていないため、Xamarin.Forms の ComputerVisionClient.ReadInStreamAsync の呼び出しと、報告された stream.Name の値から始めます。提供された MediaPicker のストリームで Invalid URI エラーを再現し、その後、OCR が画像を読み取り、例外を発生させずにテキストを返すことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Please provide us with the following information:
This issue is for a: (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
I am capturing a photo and opening a stream using Xamarin.Essentials 1.7 MediaPicker built into Essentials.
When I call the ReadInStreamAsync(stream) method in Computer Vision Client, I get an error and my Xamarin.Forms app breaks inside the method: 'Invalid URI: The format of the URI could not be determined.'
This is the stream.Name value - '/data/user/0/com.companyname.xamphotoappdemo2/cache/2203693cc04e0be7f4f024d5f9499e13/198fd32db9cc4be38a493325974fa138/d964251252fc4963aca94339d73a8007.jpg'
var stream = await file.OpenReadAsync();
chosenImage.Source = ImageSource.FromStream(() => stream);
// 2. Add OCR logic.
var client = Authenticate(ApiSettings.subscriptionKey, ApiSettings.endpoint);
var text = await client.ReadInStreamAsync(stream);
//after the request, get the operation location
string operationLocation = text.OperationLocation;
//we only need the operation ID, not the whole URL
const int numberOfCharsInOperationId = 36;
string operationId = operationLocation.Substring(operationLocation.Length - numberOfCharsInOperationId);
//Get the ocr read results
ReadOperationResult results;
do
{
results = await client.GetReadResultAsync(Guid.Parse(operationId));
}
while ((results.Status == OperationStatusCodes.Running || results.Status == OperationStatusCodes.NotStarted));
var readResults = results.AnalyzeResult.ReadResults;
var expirationDates = from page in readResults
from line in page.Lines
where line.Text.Contains("EXPIRES") && line.Words.Count == 4
select line.Words[3].Text;
expirationDate.Text = expirationDates.ToString();
Any log messages given by the failure
Expected/desired behavior
The text should be read in from the image and display on the Xaml page control.
OS and Version?
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Versions
Mention any other details that might be useful
Thanks! We'll be in touch soon.
- 主要言語
- Jupyter Notebook
- スター
- 388
- フォーク
- 555
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Azure-Samples/cognitive-services-quickstart-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
Azure-Samples/cognitive-services-quickstart-code#346 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
Azure-Samples/cognitive-services-quickstart-code の issue をすべて見る
似ている issue
-
objdetect(mcc): CCheckerDetector leaves its chart type uninitialized 🤖🤖🤖対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug imgproc-module
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Detections.select fails with scalar-valued data fields対応中かも @wpyaoxueros が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
roboflow/supervision#2768 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Model][Bug fix] Request images ignore EXIF orientation, so phone photos reach the model sidewaysオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mstar-project/mstar#675 ·
メンテナーはふだん 2 日以内に返信
-
documentation good first issue training
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100