当前位置:网站首页>Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘
Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘
2022-07-05 03:49:00 【No envy】
Successfully solved ( python3+sqlalchemy+pymysql Of pandas read_sql() Methods from MySQL Error in reading data in query )AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
List of articles
Error code
My code :
import pandas
import sqlalchemy
engine = sqlalchemy.create_engine('mssql+pymssql:// user name : password @ Address : Port number / Table name ')
sql = "select max(rid) as maxrid FROM student "
df = pandas.read_sql(sql=sql, con=engine)
print(df)
Error message :
return self.connectable.execution_options().execute(*args, **kwargs)
AttributeError: 'Engine' object has no attribute 'execution_options'

Error reason
Translation of error reporting content :
AttributeError:“ engine ” Object has no properties “execution\u options”
resolvent
Pass on “ Connect ” Variables, not “ engine ”
import pandas
import sqlalchemy
engine = sqlalchemy.create_engine('mssql+pymssql:// user name : password @ Address : Port number / Table name ')
sql = "select max(rid) as maxrid FROM student "
connection = engine.connect()
df = pandas.read_sql(sql=sql, con=connection)
print(df)
The successful running :
maxrid
0 15159049
边栏推荐
- SPI and IIC communication protocol
- In MySQL Association query, the foreign key is null. What if the data cannot be found?
- error Couldn‘t find a package.json file in “你的路径“
- Anti debugging (basic principles of debugger Design & NT NP and other anti debugging principles)
- [groovy] groovy environment setup (download groovy | install groovy | configure groovy environment variables)
- 请问一下我的请求是条件更新,但在buffer中就被拦截了,这种情况我只能每次去flush缓存么?
- 一文带你了解BI的前世今身与企业数字化转型的关系
- 040. (2.9) relieved
- 程序员的视力怎么样? | 每日趣闻
- 【软件逆向-基础知识】分析方法、汇编指令体系结构
猜你喜欢

The architect started to write a HelloWorld

Ubantu disk expansion (VMware)

Multimedia query

输入的查询SQL语句,是如何执行的?

ActiveReportsJS 3.1 VS ActiveReportsJS 3.0

Containerization Foundation
![[安洵杯 2019]不是文件上传](/img/f1/736eb5fe51c299e3152ca87895ee99.png)
[安洵杯 2019]不是文件上传

JWT vulnerability recurrence

Talk about the SQL server version of DTM sub transaction barrier function

NEW:Devart dotConnect ADO.NET
随机推荐
[web Audit - source code disclosure] obtain source code methods and use tools
When sqlacodegen generates a model, how to solve the problem that the password contains special characters?
Assembly - getting started
New interesting test applet source code_ Test available
[deep learning] deep learning reference materials
[summary of two registration methods]
深度学习——LSTM基础
[wp][入门]刷弱类型题目
glibc strlen 实现方式分析
Basic authorization command for Curl
[an Xun cup 2019] not file upload
De debugging (set the main thread as hidden debugging to destroy the debugging Channel & debugger detection)
grandMA2 onPC 3.1.2.5的DMX参数摸索
Is there any way to change the height of the uinavigationbar in the storyboard without using the UINavigationController?
企业级:Spire.Office for .NET:Platinum|7.7.x
postman和postman interceptor的安装
FBO and RBO disappeared in webgpu
Kubernetes - identity and authority authentication
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
线上故障突突突?如何紧急诊断、排查与恢复