MISP / MISP/PyTaxonomies

taxonomies.get("c").machinetags_expanded() AttributeError: 'NoneType'

Open
#5 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
31
Forks
6
PR merge metrics
No merged PRs in 30d

Description

If you try the following:

from pytaxonomies import Taxonomies
taxonomies = Taxonomies()
taxonomies.get("c").machinetags_expanded()

you get:

ile "<ipython-input-13-21c1a4715166>", line 1, in <module>
    taxonomies.get("c").machinetags_expanded()
AttributeError: 'NoneType' object has no attribute 'machinetags_expanded'

Imho I would expect all circl results (as it starts with c) or a proper error message or introduce a new method:

from pytaxonomies import Taxonomies
taxonomies = Taxonomies()
taxonomies.search("c").machinetags_expanded()

And then return the closest match (but then I would love it also searching not only in the keys but also values)

Hope that make sense.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Taxonomies.get("c") and the subsequent machinetags_expanded() call, then compare the proposed search("c") behavior. Clarify whether the expected result is an error, a prefix match, or a closest match including values; done requires a defined and tested behavior for unmatched and partial taxonomy names.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.