AttributeError: 'NoneType' object has no attribute 'group'???

图片说明
新手,在选择下面这些内容时,报错,不太懂该怎末该??求大佬
图片说明
图片说明

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Python 爬虫错误:AttributeError: 'NoneType' object has no attribute 'text'

用Python爬虫出现了题目所述的问题,求大神解答以下,救救小白吧,哭了 代码如下: Result=Soup.find('div',class_='tip-text ugc-ellipsis fade-text').text.strip() 错误提示: AttributeError Traceback (most recent call last) <ipython-input-58-c35c7a1014c4> in <module> ----> 1 Result=Soup.find('div',class_='tip-text ugc-ellipsis fade-text').text.strip() AttributeError: 'NoneType' object has no attribute 'text'

出现AttributeError: 'NoneType' object has no attribute 'to_csv'该怎么解决

用tushare获取股票指数数据,想要将数据输出保存 代码: import tushare as ts cons = ts.get_apis() df = ts.bar('sh', conn = cons, asset = 'INDEX', start_date='2010-01-01', end_date='') df.to_csv('sh.csv') 运行后出现这个错误: AttributeError: 'NoneType' object has no attribute 'to_csv' 希望各位大佬给个解决方法,谢谢!!

Python->Pyecharts->Geo在地图中加入自定义的点报错:AttributeError: 'NoneType' object has no attribute 'add'。

Geo在地图中加入自定义的点报错: AttributeError: 'NoneType' object has no attribute 'add' 原码: ``` from example.commons import Faker from pyecharts import options as opts from pyecharts.charts import Geo from pyecharts.globals import ChartType, SymbolType import pandas as pd import json # 链式调用 c = ( Geo() .add_schema(maptype="world") # 加入自定义的点,格式为 .add_coordinate("测试点", 116.39770014211535, 39.90779994986951) # 为自定义的点添加属性 .add("geo", [("测试点", 51)]) .set_series_opts(label_opts=opts.LabelOpts(is_show=False)) .set_global_opts(title_opts=opts.TitleOpts(title="宇宙中心呼唤爱")) ) # 在 html(浏览器) 中渲染图表 c.render() # 在 Jupyter Notebook 中渲染图表 c.render_notebook() ``` 报错: .add_coordinate("测试点", 116.39770014211535, 39.90779994986951) AttributeError: 'NoneType' object has no attribute 'add'

Python 程序报错 AttributeError: 'NoneType' object has no attribute 'commit'

Python 程序执行错误 AttributeError: 'NoneType' object has no attribute 'commit' 运行 Python 2.7.5 Mysql 5.7 CentOS 7.2

AttributeError: 'NoneType' object has no attribute 'append'

拟输出一个日期列表: ``` file=open("C:/Users/jyz_1/Desktop/新建文本文档.txt") file=file.read() lsy=[] dates=file.split("\n") for date in dates: while "-" in date: p1=date.index('-')#the first - p2=date.find('-',p1+1)#the second - month=date[p1+1:p2] day=date[p2+1:-1] date_on_x=int(month+day) lsy=lsy.append(date_on_x) ``` 报错: ``` Traceback (most recent call last): File "C:\Users\jyz_1\AppData\Local\Programs\Python\Python37-32\32rx.py", line 26, in <module> lsy=lsy.append(t) AttributeError: 'NoneType' object has no attribute 'append' ``` 难道lsy不是列表? 在shell中输入: ``` >>> lsy=[] >>> a='2015-1-1' >>> lsy.append(a) >>> lsy ['2015-1-1'] ``` 结果正常。 百思不得其解,求大神解惑。

出现AttributeError: 'NoneType' object has no attribute 'text'错误,无法解决....能答否?

今天在做爬虫练习时遇到: Traceback (most recent call last): File "C:\Users\Liangdawang\Desktop\crawler.py", line 7, in <module> print(title.text) AttributeError: 'NoneType' object has no attribute 'text' 本人小白 ,不知道为什么会出现这种错误,希望大佬解答仔细一点,还有就是对这种类型的解释以及类似的错误还有哪些 原代码: ``` from requests_html import HTMLSession session = HTMLSession() r = session.get('https://movie.douban.com/subject/1292052') title = r.html.find('#app > div > div > div.container > div:nth-child(6) > h3:nth-child(26) > b',first=True) print(title.text) ``` 错误截图: ![图片说明](https://img-ask.csdn.net/upload/201909/27/1569590119_512714.jpg)

为什么会出现AttributeError: 'NoneType' object has no attribute 'tobytes'求大神

ndex1 for i in range(img_list.__len__())] index1 += 1 img_data += img_list labels_data += label_list recorder_file = 'images/train.tfrecord' writer = tf.python_io.TFRecordWriter(recorder_file) for i in range(img_data.__len__()): im_d=img_data[i] im_l=labels_data[i] data= cv2.imread(im_d) #data = tf.gfile.FastGFile(im_d,'rb').read() #获得的是字节型不用转换,所获得的的包比OpenCV小 #将图片和标签封装 ex = tf.train.Example( features = tf.train.Features( feature = { 'image' : tf.train.Feature( bytes_list=tf.train.BytesList( value=[data.tobytes()] )), 'label' : tf.train.Feature( int64_list=tf.train.Int64List( value=[im_l] )), } ) ) writer.write(ex.SerializeToString()) print('everything is ok!') writer.close() ile "D:/2D/imgWrite.py", line 46, in <module> value=[data.tobytes()] AttributeError: 'NoneType' object has no attribute 'tobytes'

superset部署出现AttributeError: 'NoneType' object has no attribute 'datamodel'

执行刷新数据库 superset db upgrade 报错 ``` (env) ➜ incubator-superset-0.28.1 superset db upgrade INFO:root:logging was configured successfully /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask_caching/__init__.py:202: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled. "Flask-Caching: CACHE_TYPE is set to null, " Failed to create app Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 59, in create_app app_initializer.init_app() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 469, in init_app self.init_app_in_ctx() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 429, in init_app_in_ctx self.configure_fab() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 507, in configure_fab appbuilder.init_app(self.flask_app, db.session) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask_appbuilder/base.py", line 210, in init_app self.sm = self.security_manager_class(self) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask_appbuilder/security/sqla/manager.py", line 63, in __init__ self.userstatschartview.datamodel = user_datamodel AttributeError: 'NoneType' object has no attribute 'datamodel' ERROR:superset.app:Failed to create app Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 59, in create_app app_initializer.init_app() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 469, in init_app self.init_app_in_ctx() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 429, in init_app_in_ctx self.configure_fab() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 507, in configure_fab appbuilder.init_app(self.flask_app, db.session) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask_appbuilder/base.py", line 210, in init_app self.sm = self.security_manager_class(self) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask_appbuilder/security/sqla/manager.py", line 63, in __init__ self.userstatschartview.datamodel = user_datamodel AttributeError: 'NoneType' object has no attribute 'datamodel' Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/bin/superset", line 21, in <module> superset() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/cli.py", line 586, in main return super(FlaskGroup, self).main(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 1063, in invoke Command.invoke(self, ctx) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/cli.py", line 425, in decorator with __ctx.ensure_object(ScriptInfo).load_app().app_context(): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/cli.py", line 381, in load_app app = call_factory(self, self.create_app) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/cli.py", line 119, in call_factory return app_factory() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 66, in create_app raise ex File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 59, in create_app app_initializer.init_app() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 469, in init_app self.init_app_in_ctx() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 429, in init_app_in_ctx self.configure_fab() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/superset/app.py", line 507, in configure_fab appbuilder.init_app(self.flask_app, db.session) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask_appbuilder/base.py", line 210, in init_app self.sm = self.security_manager_class(self) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask_appbuilder/security/sqla/manager.py", line 63, in __init__ self.userstatschartview.datamodel = user_datamodel AttributeError: 'NoneType' object has no attribute 'datamodel' ```

用BS爬取网页内容之后提取标签属性,显示AttributeError: 'NoneType' object has no attribute 'text'。用print可以成功提取出文本内容,放在循环里就出错。

用BS爬取网页内容之后标签属性一直出错,显示AttributeError: 'NoneType' object has no attribute 'text' 我用print在循环之前试过是可以成功提取出文本内容的,不知道为什么在循环里就不行。求大神解惑! ``` #s = content[0].find('h5',class_="result-sub-header") #print(s.text.strip()) #遍历content,取出结果 #因为find_all返回的是一个list,再对list用find_all时,需要指定元素[0] for i in range(len(content)): #提取标题 t = content[i].find('a',class_="title") title = t.text.strip() #提取链接 url = 'https://www.forrester.com'+t['href'] #提取摘要 s = content[i].find('h5',class_="result-sub-header") summary = s.text.strip() #将提取的内容放在列表paper中 paper = [title,'Cloud Migration',url,summary] #把每个paper加到paperlist paperlist.append(paper) ```

nonetype object has no attribute recv

在多线程模块threading中出现这样的问题nonetype object has no attribute recv,请问是哪里出错了,求大神看看

AttributeError: 'NoneType' object has no attribute 'shape'求指导

![图片说明](https://img-ask.csdn.net/upload/202002/24/1582533491_216387.png)

AttributeError: 'NoneType' object has no attribute 'read'该如何解决?

![图片说明](https://img-ask.csdn.net/upload/202004/10/1586509368_243912.png)

笨方法学python3上的习题43AttributeError: 'NoneType' object has no attribute 'enter',哪错了

from sys import exit from random import randint from textwrap import dedent class Scene(object): def enter(self): print("This scene is not yet configured.") print("Subclass it and implement enter().") exit(1) class Engine(object): def __init__(self,scene_map): self.scene_map = scene_map def play(self): current_scene = self.scene_map.opening_scene() last_scene = self.scene_map.next_scene('finished') while current_scene != last_scene: next_scene_name = current_scene.enter() current_scene = self.scene_map.next_scene(next_scene_name) # be sure to print out the last scene current_scene.enter() class Death(Scene): quips = [ "You died. You kinda suck at this.", "Your mom would be pround...if she were smarter.", "such a luser.", "I have a small puppy that's better st this.", "You're worse than your Dad's jokes.", ] def enter(self): print(Death.quips[randint(0, len(self.quips)-1)]) exit(1) class CentralCorridor(Scene): def enter(self): print(dedent(""" The Gothons of Planet Percal #25 have invaded your ship and destroyed your entire crew. You are the last surviving member and your last mission is to get the neutron destruct bomb from the Weapons Armory, put it in the bridge, and blow the ship up after getting into an escape pod. You're runing down the central corridor to the Weapons Armory when a Gothon jumps out, red scaly skin, dark grimy teeth, and evil clown costume flowing around his hate filled body. He's blocking the door to the Armory and zbout to pull a weapon to blast you. """)) action = input("> ") if action == "shoot!": print(dedent(""" Quick on the draw you yank out your blaster and fire it at the Gothon. His clown costume is flowing and moving around his body, which throws off your aim. Your laser hits his costume but misses him entirely. This completely ruins his brand new costume his mother bought him, which makes him fly into an insane rage and blast you repeattedly in the face until you are dead. Then he eats you. """)) return 'death' elif action == "dodge!": print(dedent(""" Lke a world class boxer you dodge, weave, slip and slide right as the Gothon's blaster cranks a laser past your head. In the middle of your artful dodge your foot slips and you bang your head on the metal wall and pass out. You wake up shortly after only to die as the Gothon stomps on your head and eats you. """)) return 'death' elif action == "tell a joke": print(dedent(""" Lucky for you they made you learn Gothon insults in the academy. You tell the one Gothon joke you know: Lbhe zbgure vf fb sng, jura fur fvgf nebhaq gur ubhfr, fur fvgf nebhaq gur ubhfr. The Gothon stops, tries not to laugh, then busts out laughing and can't move. While he's laughing you run up and shoot him square in the head putting him down, then through the Weapon Armory door. """)) return 'laser_weapon_armory' else: print("DOES NOT COMPUTE!") return 'central_corridor' class LaserWeaponArmory(Scene): def enter(self): print(dedent(""" Youd do a dive roll into the Weapon Armory, crouch and scan the room for more Gothons that might be hiding. It's dead quiet, too quiet,You stand up and run to the far side off the room and find the neutron bomb in its container. There's a keypad lock on box and you need the code to get the bomb out. If you get the code wrong 10 times then the lock closes forever and you can't get the bomb. The code is 3 digits. """)) code = f"{randint(1,9)}{randint(1,9)}{randint(1,9)}" guess = input("[keypad]> ") guesses = 0 while guess != code and guesses<10: print("BZZZZEDDD!") guesses += 1 guess = input("[keypad]> ") if guess == code: print(dedent(""" The container clicks open and the seal breaks, letting gas out. You grab the neutron bomb and run as fast as you can to the bridge where you must place it in the right spot. """)) return 'the bridge' else: print(dedent(""" The lock buzzes one last time and then you hear a sickening melting sound as the mechanism is fused together. You decide to sit there, and finally the Gothons blow up the ship from their ship and you die. """)) return 'death' class TheBridge(Scene): def enter(self): print(dedent(""" You burst onto the Bridge eith the entron destruct bomb under your arm and surprise 5 Gonthons who are trying to take control of the ship. Each of them has an even uglier clown sostume than last.They have't pulled their weapons out yet, as they see the active bomb under your arm and don't want to set it off. """)) action = input("> ") if action == "throw the bomb": print(dedent(""" In a panic you throw the bomb at group of Gothons and make a leap for the door. Right as you drop it a Gothon shoots you right in the back killing you. As you die you see another Gothon frantically try to disarm the bomb. You die knowing they will probably blow up when it goes off. """)) return 'death' elif action == "slowly place the bomb": print(dedent("""" You point your blaster at the bomb under your arm and the Gothons put their hands up adn start to sweat. You inch backward to the door, open it, and then carefully place the bomb on the floor, pointing your blaster at it. You then jump back through the door punch the close button and blast the lock so the Gothons can't get out. Now that bomb is placed you run to the escape pod to get off this tin can. """)) return 'escape_pod' else: print("DOES NOT COMPUTE!") return 'the_bridge' class EscapePod(Scene): def EscapePod(self): print(dedent(""" You rush through the ship desperately trying to make it to the escape pod before the whole ship explodes. It seems like hardly any Gothons are on the ship, so you run is clear of interference. You get to the chamber with the escape pods, and now need to pick one to take. Some of them could be damaged but you don't have time to look. There;s 5pods, which one do you take? """)) good_pod = randint(1,5) guess = input("[pod #> ") if int(guess) != good_pod: print(dedent(""" You jump into pod {guess} and hit the eject button. The pod escapes out into the void of space, then implodes as the hull ruptures, crushing your body into jam jelly. """)) return 'death' else: print(dedent(""" You jump into pod {guess} and hit the eject button. The pod easily slides out into space heading to the plantes below. As it flies to the planet, you look back and see your ship implode then explode like a bright star, taking out the Gothon ship at the same time. You won! """)) return 'finished' class Finished(Scene): def enter(self): print("You won! Good job.") return 'finished' class Map(object): scenes = { 'central_corridor': CentralCorridor(), 'laser_weapon_armory':LaserWeaponArmory(), 'the_bridge':TheBridge(), 'escape_pod':EscapePod(), 'death':Death(), 'finished':Finished(), } def __init__(self, start_scene): self.start_scene = start_scene def next_scene(self, scene_name): val = Map.scenes.get(scene_name) return val def opening_scene(self,): return self.next_scene(self.start_scene) a_map = Map('central_corrider') a_game = Engine(a_map) a_game.play() 返回结果: Traceback (most recent call last): File "F:/Python/test43.py", line 228, in <module> a_game.play() File "F:/Python/test43.py", line 18, in play next_scene_name = current_scene.enter() AttributeError: 'NoneType' object has no attribute 'enter' Process finished with exit code 1 看了好久,就是找不到是哪里错了,很烦

<AttributeError: 'str' object has no attribute 'decode'>,跪求大神解答。

``` from django.db import models # Create your models here. class Grades(models.Model): gname = models.CharField(max_length=20) gdate = models.DateTimeField() ggirlnum = models.IntegerField() gboynum = models.IntegerField() isDelete = models.BooleanField(default=False) class Students(models.Model): sname = models.CharField(max_length=20) sgender = models.BooleanField(default=True) sage = models.IntegerField() scontend = models.CharField(max_length=20) isDelete = models.BooleanField(default=False) # 关联外键 sgrade = models.ForeignKey(Grades, on_delete=models.CASCADE) ``` Django2.2, python3.7, 执行数据库迁移<python manage.py makemigrations>时报错,<AttributeError: 'str' object has no attribute 'decode'>

新手小白,求教AttributeError: 'property' object has no attribute 'cell'解决方案

#!/usr/bin/env python # -*- coding:utf-8 -*- #sys.path.append('C:\\Users\\steven\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\site-packages\\PIL') 求大神帮忙看看这段代码问题到底出在哪里? 环境:py3.6,库是Pillow5.4.1(64位),系统WIN7 64位。 错误提示: cell = worksheet.cell(column = col, row = row1) AttributeError: 'property' object has no attribute 'cell' from openpyxl import Workbook from openpyxl.utils import get_column_letter from openpyxl.styles import PatternFill, Color from PIL import Image workbook = Workbook() # 激活 worksheet worksheet = Workbook.active # 数据可以直接分配到单元格中 im = Image.open('D:\\pycharmfile\\excel_huatu\\2.jpg') im_width = im.size[0] im_height = im.size[1] pix = im.load() n = 1 for row1 in range(1, im_height): n = n + 1 for col in range(1, im_width): ** cell = worksheet.cell(column = col, row = row1)** #这是报错部分 pixprint = pix[col - 1, row1 - 1] pixColor = "FF%02X%02X%02X" % (pixpoint[0], pixpoint[1], pixpoint[2]) fill = PatternFill(patternType='solid', fgColor=Color(rgb=pixColor)) cell.fill = fill worksheet.row_dimensions[row1].height = 6 print('\r已完成:{:.2%}'.format(n/im_height), end = '') print('\n正在生成文件,请稍后。。。') for col in range(1, im_width): worksheet.column_dimensions[get_column_letter(col)].width = 1 workbook.save('D:\\pycharmfile\\excel_huatu\\20190326.xlsx') print('文件已生成!')

生成二维均匀分布的三维图报错AttributeError: 'int' object has no attribute 'ndim'?

* 生成二维均匀分布的三维图报错 * 代码如下: ``` from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.gca(projection='3d') x=np.arange(0,1,0.01) y=np.arange(0,1,0.01) X,Y=np.meshgrid(x,y) Z1=1 Z2=0 surf=ax.plot_surface(X,Y,Z1,color='b') surf=ax.plot_surface(X,Y,Z2,color='r') plt.show() ``` * 报错信息 Traceback (most recent call last): File "二维均匀分布.py", line 15, in <module> surf=ax.plot_surface(X,Y,Z1,color='b') File "E:\DataAnalysis\python-3.7.0\lib\site-packages\mpl_toolkits\mplot3d\axes3d.py", line 1610, in plot_surface if Z.ndim != 2: AttributeError: 'int' object has no attribute 'ndim' * 截图 ![图片说明](https://img-ask.csdn.net/upload/201904/15/1555301940_905474.jpg) 给底面Z=0和均匀分布的平面Z=1染色,但显示这个问题,搜索了下,基本上没有与这个相似的。。。请教该如何改啊!~

AttributeError: '----' object has no attribute 'driver'。

这几天公司做web自动化脚本,,等做完我用着好好的,别人一用突然有的能跑有的报这个错误, selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see AttributeError: 'BasicInformationCase' object has no attribute 'driver' 在网上找了很多类似的方法可是有的说setUp问题,关键我这个没有写setUp方法啊! 而且我的电脑就能都跑通,别人的电脑就有的能跑通,有的不能跑通,求助各位大神帮帮忙,看看什么原因 异常信息: 'Traceback (most recent call last): File "D:\software\python3.7.2\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start stdin=PIPE) File "D:\software\python3.7.2\lib\subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "D:\software\python3.7.2\lib\subprocess.py", line 1178, in _execute_child startupinfo) FileNotFoundError: [WinError 2] 系统找不到指定的文件。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\工作文件\自动化脚本\abc\Template\BasicInformationCase.py", line 35, in BasicInformationCase text = self.__Demo(excelData,Number_of_cases, i, flow) File "D:\工作文件\自动化脚本\abc\Template\BasicInformationCase.py", line 70, in __Demo self.__Init_driver_Chrome() File "D:\工作文件\自动化脚本\abc\Template\BasicInformationCase.py", line 144, in __Init_driver_Chrome self.driver = webdriver.Chrome(executable_path='C:\\Program Files (x86)\\Google\\Chrome\\Application\\chromedriver.exe', chrome_options=options) # 启动浏览器 File "D:\software\python3.7.2\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__ self.service.start() File "D:\software\python3.7.2\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home 异常信息: 'Traceback (most recent call last): File "D:\software\python3.7.2\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start stdin=PIPE) File "D:\software\python3.7.2\lib\subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "D:\software\python3.7.2\lib\subprocess.py", line 1178, in _execute_child startupinfo) FileNotFoundError: [WinError 2] 系统找不到指定的文件。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\工作文件\自动化脚本\abc\Template\BasicInformationCase.py", line 35, in BasicInformationCase text = self.__Demo(excelData,Number_of_cases, i, flow) File "D:\工作文件\自动化脚本\abc\Template\BasicInformationCase.py", line 70, in __Demo self.__Init_driver_Chrome() File "D:\工作文件\自动化脚本\abc\Template\BasicInformationCase.py", line 144, in __Init_driver_Chrome self.driver = webdriver.Chrome(executable_path='C:\\Program Files (x86)\\Google\\Chrome\\Application\\chromedriver.exe', chrome_options=options) # 启动浏览器 File "D:\software\python3.7.2\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__ self.service.start() File "D:\software\python3.7.2\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home 异常信息: 'Traceback (most recent call last): File "D:\工作文件\自动化脚本\abc\Template\BasicInformationCase.py", line 35, in BasicInformationCase text = self.__Demo(excelData,Number_of_cases, i, flow) File "D:\工作文件\自动化脚本\abc\Template\BasicInformationCase.py", line 77, in __Demo restext.append(bsm.BasicInformation_Son_Module(self.driver,excelData,Number_of_cases, i)) AttributeError: 'BasicInformationCase' object has no attribute 'driver'

selenium报错:'str' object has no attribute 'text'

在base里封装了获取文本框内容的方法 在page里调用此方法来获取错误提示框的内容 代码如下 ``` # 获取文本信息 方法封装 def base_get_text(self, loc): return self.base_find(loc).text # 获取错误提示信息 def page_get_error_info(self): return self.base_get_text(page.login_err_info).text ``` 运行结果如下 AttributeError: 'str' object has no attribute 'text'

用python3爬链家的网页,遇到了AttributeError: 'str' object has no attribute 'select'的报错?

源码: ``` # -*- coding:utf-8 -*- from urllib import request from bs4 import BeautifulSoup import bs4 def get_data(): url = 'https://nj.lianjia.com/ershoufang/gulou/' headers = { 'User_agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36' } req = request.Request(url, headers=headers) response = request.urlopen(req) if response.getcode() == 200: data = response.read() data = str(data, encoding='utf-8') print(data) with open('index.html', mode='w', encoding='utf-8') as f: f.write(data) def parse_data(): with open('index.html', mode='r', encoding='utf-8') as f: html = f.read() bs = BeautifulSoup(html, 'html.parser') # 析HTML文件的时候就是用parser的 divs = bs.find_all(class_='clear LOGCLICKDATA')[0].get_text() for div in divs[0:]: div1 = div.select('.address')[0] print(div1) if __name__ == '__main__': # get_data() parse_data() ``` 报错显示是 div1 = div.select('.address')[0] 这一行出了问题 还请各位帮忙看看是怎么了

2019 AI开发者大会

2019 AI开发者大会(AI ProCon 2019)是由中国IT社区CSDN主办的AI技术与产业年度盛会。多年经验淬炼,如今蓄势待发:2019年9月6-7日,大会将有近百位中美顶尖AI专家、知名企业代表以及千余名AI开发者齐聚北京,进行技术解读和产业论证。我们不空谈口号,只谈技术,诚挚邀请AI业内人士一起共铸人工智能新篇章!

实现简单的文件系统

实验内容: 通过对具体的文件存储空间的管理、文件的物理结构、目录结构和文件操作的实现,加深对文件系统内部功能和实现过程的理解。 要求: 1.在内存中开辟一个虚拟磁盘空间作为文件存储器,在其上实现一个简

MIPS单周期CPU-组成原理实验-华中科技大学

使用logisim布线完成的MIPS单周期CPU,可支持28条指令。跑马灯的代码已经装入了寄存器,可以直接开启时钟运行。

2019数学建模A题高压油管的压力控制 省一论文即代码

2019数学建模A题高压油管的压力控制省一完整论文即详细C++和Matlab代码,希望对同学们有所帮助

基于QT和OpenCV的五子棋实现源码

一个简单的五子棋应用,基于QT和OpenCV的实现源码,通过相邻棋子判断是否获胜,不包含人工智能算法,适合新手入门

Git 实用技巧

这几年越来越多的开发团队使用了Git,掌握Git的使用已经越来越重要,已经是一个开发者必备的一项技能;但很多人在刚开始学习Git的时候会遇到很多疑问,比如之前使用过SVN的开发者想不通Git提交代码为什么需要先commit然后再去push,而不是一条命令一次性搞定; 更多的开发者对Git已经入门,不过在遇到一些代码冲突、需要恢复Git代码时候就不知所措,这个时候哪些对 Git掌握得比较好的少数人,就像团队中的神一样,在队友遇到 Git 相关的问题的时候用各种流利的操作来帮助队友于水火。 我去年刚加入新团队,发现一些同事对Git的常规操作没太大问题,但对Git的理解还是比较生疏,比如说分支和分支之间的关联关系、合并代码时候的冲突解决、提交代码前未拉取新代码导致冲突问题的处理等,我在协助处理这些问题的时候也记录各种问题的解决办法,希望整理后通过教程帮助到更多对Git操作进阶的开发者。 本期教程学习方法分为“掌握基础——稳步进阶——熟悉协作”三个层次。从掌握基础的 Git的推送和拉取开始,以案例进行演示,分析每一个步骤的操作方式和原理,从理解Git 工具的操作到学会代码存储结构、演示不同场景下Git遇到问题的不同处理方案。循序渐进让同学们掌握Git工具在团队协作中的整体协作流程。 在教程中会通过大量案例进行分析,案例会模拟在工作中遇到的问题,从最基础的代码提交和拉取、代码冲突解决、代码仓库的数据维护、Git服务端搭建等。为了让同学们容易理解,对Git简单易懂,文章中详细记录了详细的操作步骤,提供大量演示截图和解析。在教程的最后部分,会从提升团队整体效率的角度对Git工具进行讲解,包括规范操作、Gitlab的搭建、钩子事件的应用等。 为了让同学们可以利用碎片化时间来灵活学习,在教程文章中大程度降低了上下文的依赖,让大家可以在工作之余进行学习与实战,并同时掌握里面涉及的Git不常见操作的相关知识,理解Git工具在工作遇到的问题解决思路和方法,相信一定会对大家的前端技能进阶大有帮助。

实用主义学Python(小白也容易上手的Python实用案例)

原价169,限时立减100元! 系统掌握Python核心语法16点,轻松应对工作中80%以上的Python使用场景! 69元=72讲+源码+社群答疑+讲师社群分享会&nbsp; 【哪些人适合学习这门课程?】 1)大学生,平时只学习了Python理论,并未接触Python实战问题; 2)对Python实用技能掌握薄弱的人,自动化、爬虫、数据分析能让你快速提高工作效率; 3)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; 4)想修炼更好的编程内功,优秀的工程师肯定不能只会一门语言,Python语言功能强大、使用高效、简单易学。 【超实用技能】 从零开始 自动生成工作周报 职场升级 豆瓣电影数据爬取 实用案例 奥运冠军数据分析 自动化办公:通过Python自动化分析Excel数据并自动操作Word文档,最终获得一份基于Excel表格的数据分析报告。 豆瓣电影爬虫:通过Python自动爬取豆瓣电影信息并将电影图片保存到本地。 奥运会数据分析实战 简介:通过Python分析120年间奥运会的数据,从不同角度入手分析,从而得出一些有趣的结论。 【超人气老师】 二两 中国人工智能协会高级会员 生成对抗神经网络研究者 《深入浅出生成对抗网络:原理剖析与TensorFlow实现》一书作者 阿里云大学云学院导师 前大型游戏公司后端工程师 【超丰富实用案例】 0)图片背景去除案例 1)自动生成工作周报案例 2)豆瓣电影数据爬取案例 3)奥运会数据分析案例 4)自动处理邮件案例 5)github信息爬取/更新提醒案例 6)B站百大UP信息爬取与分析案例 7)构建自己的论文网站案例

深度学习原理+项目实战+算法详解+主流框架(套餐)

深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)

C/C++跨平台研发从基础到高阶实战系列套餐

一 专题从基础的C语言核心到c++ 和stl完成基础强化; 二 再到数据结构,设计模式完成专业计算机技能强化; 三 通过跨平台网络编程,linux编程,qt界面编程,mfc编程,windows编程,c++与lua联合编程来完成应用强化 四 最后通过基于ffmpeg的音视频播放器,直播推流,屏幕录像,

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

Python界面版学生管理系统

前不久上传了一个控制台版本的学生管理系统,这个是Python界面版学生管理系统,这个是使用pycharm开发的一个有界面的学生管理系统,基本的增删改查,里面又演示视频和完整代码,有需要的伙伴可以自行下

Vue.js 2.0之全家桶系列视频课程

基于新的Vue.js 2.3版本, 目前新全的Vue.js教学视频,让你少走弯路,直达技术前沿! 1. 包含Vue.js全家桶(vue.js、vue-router、axios、vuex、vue-cli、webpack、ElementUI等) 2. 采用笔记+代码案例的形式讲解,通俗易懂

linux“开发工具三剑客”速成攻略

工欲善其事,必先利其器。Vim+Git+Makefile是Linux环境下嵌入式开发常用的工具。本专题主要面向初次接触Linux的新手,熟练掌握工作中常用的工具,在以后的学习和工作中提高效率。

JAVA初级工程师面试36问(完结)

第三十一问: 说一下线程中sleep()和wait()区别? 1 . sleep()是让正在执行的线程主动让出CPU,当时间到了,在回到自己的线程让程序运行。但是它并没有释放同步资源锁只是让出。 2.wait()是让当前线程暂时退让出同步资源锁,让其他线程来获取到这个同步资源在调用notify()方法,才会让其解除wait状态,再次参与抢资源。 3. sleep()方法可以在任何地方使用,而wait()只能在同步方法或同步块使用。 ...

java jdk 8 帮助文档 中文 文档 chm 谷歌翻译

JDK1.8 API 中文谷歌翻译版 java帮助文档 JDK API java 帮助文档 谷歌翻译 JDK1.8 API 中文 谷歌翻译版 java帮助文档 Java最新帮助文档 本帮助文档是使用谷

我以为我对Mysql事务很熟,直到我遇到了阿里面试官

太惨了,面试又被吊打

智鼎(附答案).zip

并不是完整题库,但是有智鼎在线2019年9、10、11三个月的试题,有十七套以上题目,普通的网申行测题足以对付,可以在做题时自己总结一些规律,都不是很难

Visual Assist X 破解补丁

vs a's'sixt插件 支持vs2008-vs2019 亲测可以破解,希望可以帮助到大家

150讲轻松搞定Python网络爬虫

【为什么学爬虫?】 &nbsp; &nbsp; &nbsp; &nbsp;1、爬虫入手容易,但是深入较难,如何写出高效率的爬虫,如何写出灵活性高可扩展的爬虫都是一项技术活。另外在爬虫过程中,经常容易遇到被反爬虫,比如字体反爬、IP识别、验证码等,如何层层攻克难点拿到想要的数据,这门课程,你都能学到! &nbsp; &nbsp; &nbsp; &nbsp;2、如果是作为一个其他行业的开发者,比如app开发,web开发,学习爬虫能让你加强对技术的认知,能够开发出更加安全的软件和网站 【课程设计】 一个完整的爬虫程序,无论大小,总体来说可以分成三个步骤,分别是: 网络请求:模拟浏览器的行为从网上抓取数据。 数据解析:将请求下来的数据进行过滤,提取我们想要的数据。 数据存储:将提取到的数据存储到硬盘或者内存中。比如用mysql数据库或者redis等。 那么本课程也是按照这几个步骤循序渐进的进行讲解,带领学生完整的掌握每个步骤的技术。另外,因为爬虫的多样性,在爬取的过程中可能会发生被反爬、效率低下等。因此我们又增加了两个章节用来提高爬虫程序的灵活性,分别是: 爬虫进阶:包括IP代理,多线程爬虫,图形验证码识别、JS加密解密、动态网页爬虫、字体反爬识别等。 Scrapy和分布式爬虫:Scrapy框架、Scrapy-redis组件、分布式爬虫等。 通过爬虫进阶的知识点我们能应付大量的反爬网站,而Scrapy框架作为一个专业的爬虫框架,使用他可以快速提高我们编写爬虫程序的效率和速度。另外如果一台机器不能满足你的需求,我们可以用分布式爬虫让多台机器帮助你快速爬取数据。 &nbsp; 从基础爬虫到商业化应用爬虫,本套课程满足您的所有需求! 【课程服务】 专属付费社群+每周三讨论会+1v1答疑

JavaWEB商城项目(包括数据库)

功能描述:包括用户的登录注册,以及个人资料的修改.商品的分类展示,详情,加入购物车,生成订单,到银行支付等!另外还有收货地址的和我的收藏等常用操作.环境(JDK 1.7 ,mysql 5.5,Ecli

Python数据挖掘简易入门

&nbsp; &nbsp; &nbsp; &nbsp; 本课程为Python数据挖掘方向的入门课程,课程主要以真实数据为基础,详细介绍数据挖掘入门的流程和使用Python实现pandas与numpy在数据挖掘方向的运用,并深入学习如何运用scikit-learn调用常用的数据挖掘算法解决数据挖掘问题,为进一步深入学习数据挖掘打下扎实的基础。

一学即懂的计算机视觉(第一季)

图像处理和计算机视觉的课程大家已经看过很多,但总有“听不透”,“用不了”的感觉。课程致力于创建人人都能听的懂的计算机视觉,通过生动、细腻的讲解配合实战演练,让学生真正学懂、用会。 【超实用课程内容】 课程内容分为三篇,包括视觉系统构成,图像处理基础,特征提取与描述,运动跟踪,位姿估计,三维重构等内容。课程理论与实战结合,注重教学内容的可视化和工程实践,为人工智能视觉研发及算法工程师等相关高薪职位就业打下坚实基础。 【课程如何观看?】 PC端:https://edu.csdn.net/course/detail/26281 移动端:CSDN 学院APP(注意不是CSDN APP哦) 本课程为录播课,课程2年有效观看时长,但是大家可以抓紧时间学习后一起讨论哦~ 【学员专享增值服务】 源码开放 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化 下载方式:电脑登录https://edu.csdn.net/course/detail/26281,点击右下方课程资料、代码、课件等打包下载

软件测试2小时入门

本课程内容系统、全面、简洁、通俗易懂,通过2个多小时的介绍,让大家对软件测试有个系统的理解和认识,具备基本的软件测试理论基础。 主要内容分为5个部分: 1 软件测试概述,了解测试是什么、测试的对象、原则、流程、方法、模型;&nbsp; 2.常用的黑盒测试用例设计方法及示例演示;&nbsp; 3 常用白盒测试用例设计方法及示例演示;&nbsp; 4.自动化测试优缺点、使用范围及示例‘;&nbsp; 5.测试经验谈。

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

课程主要面向嵌入式Linux初学者、工程师、学生 主要从一下几方面进行讲解: 1.linux学习路线、基本命令、高级命令 2.shell、vi及vim入门讲解 3.软件安装下载、NFS、Samba、FTP等服务器配置及使用

2019 Python开发者日-培训

本次活动将秉承“只讲技术,拒绝空谈”的理念,邀请十余位身处一线的Python技术专家,重点围绕Web开发、自动化运维、数据分析、人工智能等技术模块,分享真实生产环境中使用Python应对IT挑战的真知灼见。此外,针对不同层次的开发者,大会还安排了深度培训实操环节,为开发者们带来更多深度实战的机会。

快速入门Android开发 视频 教程 android studio

这是一门快速入门Android开发课程,顾名思义是让大家能快速入门Android开发。 学完能让你学会如下知识点: Android的发展历程 搭建Java开发环境 搭建Android开发环境 Android Studio基础使用方法 Android Studio创建项目 项目运行到模拟器 项目运行到真实手机 Android中常用控件 排查开发中的错误 Android中请求网络 常用Android开发命令 快速入门Gradle构建系统 项目实战:看美图 常用Android Studio使用技巧 项目签名打包 如何上架市场

机器学习初学者必会的案例精讲

通过六个实际的编码项目,带领同学入门人工智能。这些项目涉及机器学习(回归,分类,聚类),深度学习(神经网络),底层数学算法,Weka数据挖掘,利用Git开源项目实战等。

4小时玩转微信小程序——基础入门与微信支付实战

这是一个门针对零基础学员学习微信小程序开发的视频教学课程。课程采用腾讯官方文档作为教程的唯一技术资料来源。杜绝网络上质量良莠不齐的资料给学员学习带来的障碍。 视频课程按照开发工具的下载、安装、使用、程序结构、视图层、逻辑层、微信小程序等几个部分组织课程,详细讲解整个小程序的开发过程

相关热词 c#分级显示数据 c# 不区分大小写替换 c#中调用就java c#正则表达式 验证小数 c# vscode 配置 c#三维数组能存多少数据 c# 新建excel c#多个文本框 c#怎么创建tcp通讯 c# mvc 电子病例
立即提问