我正在使用python启动一个webscraping项目。我已按照说明进行操作,并将bs4安装到我的site-packages目录中。
从urllib.request导入urlopen作为uReq 从bs4导入BeautifulSoup
Traceback (most recent call last):
File "C:\Users\Mir Cool\Desktop\AutomateBoring\webScraper.py", line 4, in <module>
from bs4 import BeautifulSoup
File "C:\Users\Mir Cool\AppData\Local\Programs\Python\Python37-32\lib\site-packages\bs4\__init__.py", line 34, in <module>
from .builder import builder_registry, ParserRejectedMarkup
File "C:\Users\Mir Cool\AppData\Local\Programs\Python\Python37-32\lib\site-packages\bs4\builder\__init__.py", line 7, in <module>
from bs4.element import (
File "C:\Users\Mir Cool\AppData\Local\Programs\Python\Python37-32\lib\site-packages\bs4\element.py", line 19, in <module>
from bs4.dammit import EntitySubstitution
File "C:\Users\Mir Cool\AppData\Local\Programs\Python\Python37-32\lib\site-packages\bs4\dammit.py", line 15, in <module>
import logging
File "C:\Users\Mir Cool\Desktop\AutomateBoring\logging.py", line 3, in <module>
logging.basicConfig(level = logging.DEBUG, format = '%(asctime)s - %(levelname)s - %(message)s')
AttributeError: module 'logging' has no attribute 'basicConfig'