I cant use methods from a python library with objects i create in grasshopper/python

unhandled

#1

Hi, i try to call this code inside grasshopper python and i cant make it work:

soup = bs4.BeautifulSoup(sauce,“html.parser”)

for negritas in soup.find_all(class_ = “negritas”)[:6]:
print (negritas.get_text())
print (negritas.nextSibling.get_text())

the problem i see, is that the object soup is not created in grass, so i cant call methods on it.

Any idea?


#2

Please Add the Error Messages


#3

Dont send message, its only doesnt show the info, but dont do anything the message thats appear is an empty list like this
[]

in my python code it works perfectly but in grasshopper doesnt get the information


#4

Now i have a problem, when I run the scrip’t appears this message:

Runtime error (ValueErrorException): 8593 is not in required range
Traceback:
line 2507, in , “C:\Users\BOIG\AppData\Local\Programs\Python\Python35-32\Lib\html\entities.py”
line 6, in , “C:\Users\BOIG\AppData\Local\Programs\Python\Python35-32\Lib\html_init_.py”
line 8, in , “C:\Program Files\Rhinoceros 5 (64-bit)\Plug-ins\IronPython\Lib\bs4\builder_htmlparser.py”
line 250, in , “C:\Program Files\Rhinoceros 5 (64-bit)\Plug-ins\IronPython\Lib\bs4\builder_init_.py”
line 30, in , “C:\Program Files\Rhinoceros 5 (64-bit)\Plug-ins\IronPython\Lib\bs4_init_.py”
line 21, in script

Any idea ?