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

今天在做爬虫练习时遇到:
Traceback (most recent call last):
File "C:\Users\Liangdawang\Desktop\crawler.py", line 7, in
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)

错误截图:

图片说明

2个回答

title没有这个text属性,可以查看api或者调试看下有哪些属性或方法

用浏览器的f12功能寻找下你要找的元素对应的xpath,直接复制过来
你的xpath表达式写错了,导致title没有找到

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

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 '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'

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'] ``` 结果正常。 百思不得其解,求大神解惑。

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' ```

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'

用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) ```

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: 'NoneType' object has no attribute 'group'???

![图片说明](https://img-ask.csdn.net/upload/201809/25/1537804947_240118.jpg) 新手,在选择下面这些内容时,报错,不太懂该怎末该??求大佬 ![图片说明](https://img-ask.csdn.net/upload/201809/25/1537805036_376602.jpg) ![图片说明](https://img-ask.csdn.net/upload/201809/25/1537804959_129886.jpg)

求助:AttributeError: type object 'Topic' has no attribute 'object'

python新手,求助个有关django的问题 django版本:2.1.5 python版本:3.6.0 问题如下: 项目路径\ learning_log 应用路径\learning_logs \learning_log\urls代码: from django.contrib import admin from django.urls import path,include urlpatterns = [ path('admin/', admin.site.urls), path('',include('learning_logs.urls')) ] \learning_logs.urls代码: from django.urls import path from . import views app_name = 'learning_logs' urlpatterns = [ path('',views.index,name='index'), path('topics/',views.topics,name='topics'), ] \learning_logs.views代码: from django.shortcuts import render from .models import Topic,Entry def index(request): return render(request,'learning_logs/index.html') def topics(request): a = Topic.object.order_by('date_added') context = {'topics':a} return render(request,'learning_logs/topics.html',context) \learning_logs.models代码: from django.db import models class Topic(models.Model): text = models.CharField(max_length=200) date_added = models.DateTimeField(auto_now_add=True) def __str__(self): return self.text class Entry(models.Model): topic = models.ForeignKey(Topic,on_delete=models.CASCADE) text = models.TextField() date_added = models.DateTimeField(auto_now_add=True) class Meta: verbose_name_plural = 'entries' def __str__(self): if len(self.text) < 50: return self.text else: return self.text[:50] + '...' 运行网页后: http://127.0.0.1:8000/ 显示如下,正常 Learning Log - Topics Learning Log helps you keep track of your learning, for any topic you're learning about. 运行 http://127.0.0.1:8000/Topic/ 后报错如下: AttributeError at /topics/ type object 'Topic' has no attribute 'object'

调用anaconda下的sklearn时,出现AttributeError: 'bool' object has no attribute 'any'

调用anaconda下的sklearn时,出现AttributeError: 'bool' object has no attribute 'any',无法解决

python出现问题:AttributeError: 'str' object has no attribute 'values'

![图片说明](https://img-ask.csdn.net/upload/201905/29/1559097867_501925.png)![图片说明](https://img-ask.csdn.net/upload/201905/29/1559097874_506133.png)

Python进行决策树剪枝提示AttributeError: 'function' object has no attribute 'deepcopy'。

![图片说明](https://img-ask.csdn.net/upload/201905/13/1557681499_941647.png) 在进行决策树剪枝的时候出现AttributeError: 'function' object has no attribute 'deepcopy'错误,一直解决不了。

生成二维均匀分布的三维图报错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'

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《Oracle Java SE编程自学与面试指南》最佳学习路线图2020年最新版(进大厂必备)

正确选择比瞎努力更重要!

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

都前后端分离了,咱就别做页面跳转了!统统 JSON 交互

文章目录1. 无状态登录1.1 什么是有状态1.2 什么是无状态1.3 如何实现无状态1.4 各自优缺点2. 登录交互2.1 前后端分离的数据交互2.2 登录成功2.3 登录失败3. 未认证处理方案4. 注销登录 这是本系列的第四篇,有小伙伴找不到之前文章,松哥给大家列一个索引出来: 挖一个大坑,Spring Security 开搞! 松哥手把手带你入门 Spring Security,别再问密...

字节跳动面试官竟然问了我JDBC?

轻松等回家通知

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

阿里面试官让我用Zk(Zookeeper)实现分布式锁

他可能没想到,我当场手写出来了

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

代码注释如此沙雕,会玩还是你们程序员!

某站后端代码被“开源”,同时刷遍全网的,还有代码里的那些神注释。 我们这才知道,原来程序员个个都是段子手;这么多年来,我们也走过了他们的无数套路… 首先,产品经理,是永远永远吐槽不完的!网友的评论也非常扎心,说看这些代码就像在阅读程序员的日记,每一页都写满了对产品经理的恨。 然后,也要发出直击灵魂的质问:你是尊贵的付费大会员吗? 这不禁让人想起之前某音乐app的穷逼Vip,果然,穷逼在哪里都是...

2020春招面试了10多家大厂,我把问烂了的数据库事务知识点总结了一下

2020年截止目前,我面试了阿里巴巴、腾讯、美团、拼多多、京东、快手等互联网大厂。我发现数据库事务在面试中出现的次数非常多。

立即提问
相关内容推荐