当前位置:网站首页>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
边栏推荐
- [learning notes] month end operation -gr/ir reorganization
- What is the most effective way to convert int to string- What is the most efficient way to convert an int to a String?
- C file in keil cannot be compiled
- Yyds dry goods inventory embedded matrix
- ActiveReportsJS 3.1 VS ActiveReportsJS 3.0
- 程序员的视力怎么样? | 每日趣闻
- Web components series (VII) -- life cycle of custom components
- MindFusion.Virtual Keyboard for WPF
- Talk about the SQL server version of DTM sub transaction barrier function
- [105] Baidu brain map - Online mind mapping tool
猜你喜欢
Operation flow of UE4 DMX and grandma2 onpc 3.1.2.5
Use of kubesphere configuration set (configmap)
IPv6 experiment
Containerization Foundation
[learning notes] month end operation -gr/ir reorganization
De debugging (set the main thread as hidden debugging to destroy the debugging Channel & debugger detection)
DMX parameter exploration of grandma2 onpc 3.1.2.5
Clickhouse synchronization MySQL (based on materialization engine)
Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?
Smart pointer shared_ PTR and weak_ Difference of PTR
随机推荐
英语必备词汇3400
Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?
Operation flow of UE4 DMX and grandma2 onpc 3.1.2.5
程序员的视力怎么样? | 每日趣闻
Flex flexible layout
[groovy] string (string splicing | multi line string)
[groovy] string (string type variable definition | character type variable definition)
[C language] address book - dynamic and static implementation
Difference between MotionEvent. getRawX and MotionEvent. getX
[punch in questions] integrated daily 5-question sharing (phase III)
Google Chrome CSS will not update unless the cache is cleared - Google Chrome CSS doesn't update unless clear cache
输入的查询SQL语句,是如何执行的?
Technology sharing swift defense programming
[groovy] groovy environment setup (download groovy | install groovy | configure groovy environment variables)
NEW:Devart dotConnect ADO.NET
MySQL winter vacation self-study 2022 11 (9)
DECLARE_ WAIT_ QUEUE_ HEAD、wake_ up_ Interruptible macro analysis
Anti debugging (basic principles of debugger Design & NT NP and other anti debugging principles)
About MySQL database connection exceptions
Basic authorization command for Curl