# My anki addon isn't finding the notes

**URL:** https://forums.ankiweb.net/t/my-anki-addon-isnt-finding-the-notes/15292
**Category:** Add-ons
**Created:** [November 25, 2021, 3:38pm UTC](https://forums.ankiweb.net/t/my-anki-addon-isnt-finding-the-notes/15292 "2021-11-25T15:38:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![KamiKunDesu](https://avatars.discourse-cdn.com/v4/letter/k/f05b48/32.png) [@KamiKunDesu](https://forums.ankiweb.net/u/KamiKunDesu)
#### Post date: [November 25, 2021, 3:38pm UTC](https://forums.ankiweb.net/t/my-anki-addon-isnt-finding-the-notes/15292/1 "2021-11-25T15:38:57Z")

</div>

```python
# import the main window object (mw) from aqt
from aqt import mw
# import the "show info" tool from utils.py
from aqt.utils import showInfo, qconnect
# import all of the Qt GUI library
from aqt.qt import *
from bs4 import BeautifulSoup
import requests

def return_search(word):
    html = f"https://jisho.org/word/{word}"
    webpage = requests.get(html).content
    soup = BeautifulSoup(webpage, "html.parser")
    meanings_list = []
    meanings = soup.find_all(attrs = {"class": "meaning-meaning"})

    for count, item in enumerate(meanings):
        meanings_list.append(f"{count+1}) {item.get_text()}")

    meanings_list = '\n\n'.join(meanings_list)

    return meanings_list

def testFunction() -> None:
    ids = mw.col.find_cards("tag:jpzr")
    for _id in ids:
        note = mw.col.getNote(_id)
        meaning_list = return_search(note["Focus"])
        note["Meaning"] += meaning_list
        note.flush()

# create a new menu item, "test"
action = QAction("test", mw)
# set it to call testFunction when it's clicked
qconnect(action.triggered, testFunction)
# and add it to the tools menu
mw.form.menuTools.addAction(action)

```

I’m getting an error in line 27 of my addon code when trying to find the note - does anyone know how to fix this?

---

<div class="post-metadata">

### Author: ![Rumo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/rumo/32/1505_2.png) [@Rumo](https://forums.ankiweb.net/u/Rumo)
#### Post date: [November 25, 2021, 4:58pm UTC](https://forums.ankiweb.net/t/my-anki-addon-isnt-finding-the-notes/15292/2 "2021-11-25T16:58:35Z")

</div>

It would help to know what the error is, but you’re clearly passing a _card_ id to `getNote()`. Use `find_notes()` to get note ids. As an aside, camelcase names, at least in `pylib`, are deprecated, so you should also replace `getNote()` with `get_note()`.

---

<div class="post-metadata">

### Author: ![KamiKunDesu](https://avatars.discourse-cdn.com/v4/letter/k/f05b48/32.png) [@KamiKunDesu](https://forums.ankiweb.net/u/KamiKunDesu)
#### Post date: [April 25, 2022, 9:19pm UTC](https://forums.ankiweb.net/t/my-anki-addon-isnt-finding-the-notes/15292/3 "2022-04-25T21:19:09Z")

</div>

This worked, thank you so much
