asyml / asyml/stave

Get TypeError when running `forte/examples/visualize`

Open
#198 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
52
Forks
15
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Get a `TypeError` when running the examples in [`forte/examples/visualize`](https://github.com/asyml/forte/tree/master/examples/visualize).
```typescript
TypeError: undefined is not an object (evaluating 'o.position.rects[0].x')
```

**To Reproduce**
Steps to reproduce the behavior:
1.
```bash
git clone https://github.com/asyml/forte.git
cd forte/examples/visualize
cat README.md
```
2. Follow the steps described in the [`README.md`](https://github.com/asyml/forte/blob/master/examples/visualize/README.md) file and you will get a terminal prompt like:
```bash
Enter your query here:
```
3. Copy the following text and paste it into terminal.
```
Forte provides a platform to assemble state-of-the-art NLP and ML technologies in a highly-composable fashion, including a wide spectrum of tasks ranging from Information Retrieval, Natural Language Understanding to Natural Language Generation.
```
Press `return` on keyboard and a Stave web page should be popped out, from which you can view the text you just entered.
4. Click the radio button of `Token` on the left panel and an error message will show in browser console.
```typescript
TypeError: undefined is not an object (evaluating 'o.position.rects[0].x')
```

**Expected behavior**
No error should appear and Stave should correctly show the `Token` annotations.

**Screenshots**
![image](https://user-images.githubusercontent.com/54747962/123176859-38c87480-d452-11eb-934f-79092eadc39b.png)
image

**Environment (please complete the following information):**
- OS: macOS
- Version 11.4

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the setup and run instructions in forte/examples/visualize/README.md, reproduce the issue, and inspect the browser console after selecting the Token radio button. Trace the visualization path associated with Token annotations and verify the result in Stave. Done means the example renders Token annotations without the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.