Hey guys i am getting error in this code of mine and idk why pls help | Sololearn: Learn to code for FREE!

+1

Hey guys i am getting error in this code of mine and idk why pls help

Whenever i try to run the program on pydroid 3 I get this error while i have installed all the libraries and imported them File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module> start(fakepyfile,mainpyfile) File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start exec(open(mainpyfile).read(), __main__.__dict__) File "<string>", line 5, in <module> File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.9/site-packages/bs4/__init__.py", line 313, in __init__ elif len(markup) <= 256 and ( TypeError: object of type 'Response' has no len() https://code.sololearn.com/cSW2MdPw0Zrt/?ref=app https://code.sololearn.com/cSW2MdPw0Zrt/?ref=app

8/14/2022 2:32:47 PM

Programming_C#

4 Answers

New Answer

+2

Hi, TypeError: object of type 'Response' has no len() add this 2 lines at the beginning(only in Sololearn) **** import os os.system("pip -qq install bs4") **** and make the soup from data.text after that 2 corrections everything is fine if response is 200 (you should check that)

+2

Oma Falk Is this the correct output ? 👇🏻 [<a href="/ref=cs_503_logo"><img alt="Amazon.com" id="b" src="https://images-na.ssl-images-amazon.com../Playground/"/></a>, <a href="/ref=cs_503_link"><img alt="Sorry! Something went wrong on our end. Please go back and try again or go to Amazon's home page." src="https://images-na.ssl-images-amazon.com../Playground/"/></a>, <a href="/dogsofamazon/ref=cs_503_d" rel="noopener noreferrer" target="_blank"><img alt="Dogs of Amazon" id="d"/></a>]

+1

**🇦🇪|🇦🇪** looks good

+1

Oma Falk thanks