Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    2
    2
    390
    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 zhu
      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

      Ekopalypse 1 Reply Last reply Reply Quote 0
      • Ekopalypse
        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
        Copyright © 2014 NodeBB Forums | Contributors