Visual Studio Code Parsing

50 views
Skip to first unread message

Caroline Guénette

unread,
May 25, 2025, 11:48:16 AMMay 25
to beautifulsoup
Hi, 
I got an parsing error from VS Code but the code compiled. I tried to add a bs4 type to my variables but it doesn't change the error. Is there any hint about what is causing this and how to solve the parsing problem? Thanks!

Here a printscreen.Snag_37c41cd0.png

Caroline

Chris Papademetrious

unread,
May 25, 2025, 12:30:23 PMMay 25
to beautifulsoup
Hi Caroline,

First try replacing bs4_ul.select with bs4_ul.css.select.

Second, if you only need one child of the tag, you can use select_one instead of select, then remove the [0] index on the variable value.

(I didn't test these - I hope I remembered correctly from memory!)

 - Chris

Caroline Guénette

unread,
May 25, 2025, 10:42:37 PMMay 25
to beautifulsoup
I added some type validation and VS Code do not shout anyomre .
I will try the select_one instead, yeah. Thanks!!
Reply all
Reply to author
Forward
0 new messages