0

I am a newbie at python, this is a simple code from different solution, it should generally work but I am receiving an error from Beautifulsoup (screen below) on markup not provided.

I am using PTVS and python 3.5.

Python code:

from robobrowser import RoboBrowser

url = "http://www.google.com"
br = RoboBrowser(history=True)
br.open(url)
print (br.parsed)

Error: enter image description here

Same Error with IDLE too: enter image description here

Community
  • 1
  • 1
surpavan
  • 1,372
  • 7
  • 34
  • 66
  • Could not reproduce error (worked just fine for me). Python 3.4.3, Robobrowser 0.5.3, Ubuntu 14.04.5 LTS. – Abd Azrad Sep 18 '16 at 19:58
  • Looking at it more, it seems like the error you got in IDLE is different (you probably pasted in more than one line at a time). Looks like you are using windows terminal and I'm guessing it's a unicode problem. – Abd Azrad Sep 18 '16 at 20:06
  • @AbdAzrad : This is the same that comes default with python installation. Downloaded from python official website. Even then, same error should not be showing on PTVS also. – surpavan Sep 19 '16 at 09:55
  • Listen, you have 2 different errors. The error you got from the windows terminal is a unicode error. The error you got from IDLE was because you tried to paste in more than one line (a trivial error). IDLE handles unicode properly so that it why it eventually printed it. As I understand it, the windows terminal can't handle unicode, and that is why your code worked on my computer and not yours (I don't use windows). This is where you should concentrate your efforts (fixing this unicode problem). – Abd Azrad Sep 19 '16 at 19:37

0 Answers0