0

I have a separate list of key_ids for multiple drawings within the bread drawing group. I would like to see whether the key_ids I have match the key_ids that are associated with each bread drawing within the bread category, and then extract the info associated with the matched drawing (such as strokes, etc.)

I am trying to get the key_ids for each bread drawing from the quickdraw package and put them in a new list that I can match to the separate list of key_ids I have. However, I am unable to extract the key_ids for each drawing from the quickdraw data.

Currently I have:

breads = QuickDrawDataGroup("bread")
def drawings():
    newlist = []
    for bread in breads.drawings:
        print(bread) 
        newlist.append(bread)
    return newlist

However, I am getting this error:

for bread in breads.drawings:
RuntimeError: generator raised StopIteration

Is there a way to fix this so that I may make a new list of key_ids?

Additionally, once I get a match in key_ids I want to search through the quickdraw drawings to get the specific drawing and it's information by doing

breads.search_drawings(key_id=6224124814819328) #this is an example

however, I am unable to do this as I keep getting an error.

Cleptus
  • 3,446
  • 4
  • 28
  • 34
Angie
  • 183
  • 3
  • 13

1 Answers1

0

It would seem you are using python >= 3.7 with a library that is not compatible.

See this :

"RuntimeError: generator raised StopIteration" every time I try to run app

Try to see with the Quickdraw documentation which versions of python are supported.

A-y
  • 793
  • 5
  • 16
  • I've changed the version to 2.7, but then the quickdraw package that I imported no longer works and I get an error: ``` ImportError: No module named quickdraw``` – Angie Jun 04 '20 at 19:52
  • You will need to reinstall your module if you go from python3 to python2. Again, check quickdraw's documentation to see which version are supported. – A-y Jun 04 '20 at 19:57