Community
    • Login

    Notepad reports an error while Pycharm can execute normally.Why???

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 577 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • liuming zhuL
      liuming zhu
      last edited by

      import requests
      from bs4 import BeautifulSoup

      res = requests.get(‘https://localprod.pandateacher.com/python-manuscript/crawler-html/spider-men5.0.html’)

      html = res.text

      print(res.status_code)
      print(html)

      UnicodeEncodeError: ‘gbk’ codec can’t encode character ‘\xa9’ in position 3738: illegal multibyte sequence

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @liuming zhu
        last edited by

        @liuming-zhu

        this is a python programming question rather than a npp related one.
        See here. Npp doesn’t silently change your code.
        Why you get different result can’t be answered from remote - obviously you do have different configurations.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors