raceback (most recent call last): File "log2user-real.py", line 49, in <module> db = create_engine("mysql+pymysql://root:{m_pass}@10.157.2.25:8306/log_user?charset=utf8".format(m_pass=m_pass)) File "<string>", line 2, in create_engine File "/usr/local/lib/python2.7/site-packages/sqlalchemy/util/deprecations.py", line 309, in warned return fn(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/create.py", line 548, in create_engine dbapi = dialect_cls.dbapi(**dbapi_args) File "/usr/local/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/pymysql.py", line 68, in dbapi return __import__("pymysql") File "build/bdist.linux-x86_64/egg/pymysql/__init__.py", line 59, in <module> File "/usr/local/lib/python2.7/site-packages/PyMySQL-1.0.2-py2.7.egg/pymysql/connections.py", line 167 *, ^ SyntaxError: invalid syntax
Solution: Specify the PyMySQL version as 0.10.1, and write in the requirements.txt file:PyMySQL==0.10.1
pip install pymysql==0.10.1
Read More:
- [Solved] pymysql.err.ProgrammingError: (1064, ‘You have an error in your SQL syntax;
- [Solved] sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, “You have an error in your SQ
- [Solved] pymysql.err.OperationalError: (1045, “Access denied for user ‘root‘@‘192.168.118.44‘
- [Solved] pymysql.err.internalError: (1054, “Unknown column ‘LGD_xiaohong’ in ‘field list’”)
- [Solved] ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full comm
- Centos7 Initialize mysql Error: Could not open file ‘/usr/local/mysql/log/mysqld.log‘ for error logging: Per
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket’/var/lib/mysql/mysql.sock’ (2)
- How to Solve can‘t connect to local mysql server through socket ‘/var/lib/mysql/mysql.sock‘
- [Solved] Connections could not be acquired from the underlying database
- [Solved] Python import Error: pip –upgrade Error: ERROR: Cannot uninstall ‘dnspython‘. It is a distutils installed
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- [Solved] MYSQL Command Execute Error: Can ‘t connect to local MySQL server through socket ‘/tmp/mysql.sock ‘(2) “
- [Solved] java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corres
- [Solved] MySQL5.6.44 [Err] 1067 – Invalid default value for create_date settlement programme
- [Solved] MySQL: Syntax error or access violation: 1055 Expression #1 of SELECT list is not …
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- MySql Install Error: Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
- How to Solve mysql [Err] 1067-Invalid default value for
- [Solved]ERROR 1067 (42000): Invalid default value for ‘end_time‘ Mysql