python
1#encoding:utf-8 2from selenium import webdriver 3import DatabaseOpe 4import sys 5import io 6import os 7import time 8from bs4 import BeautifulSoup 9import urllib 10import re 11from selenium.webdriver.common.keys import Keys 12import re 13 14sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
上のコードを実行すると
Traceback (most recent call last):
File "starbot.py", line 14, in <module>
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
AttributeError: 'file' object has no attribute 'buffer'
とでます。
これはどういうことですか?どうやったらなおせますか?