已有184人关注
运行微信小程序,授权后登陆不成功,对应的数据库和表我已经运行sql语句创建了
发表在Python图书答疑 2019-11-09 《Python项目开发案例集锦》第21章 看图猜成语小程序
是否精华
版块置顶:

C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\pymysql\cursors.py:170: Warning: (1366, "Incorrect string value: '\\xD6\\xD0\\xB9\\xFA\\xB1\\xEA...' for column 'VARIABLE_VALUE' at row 1")

  result = self._query(query)

127.0.0.1 - - [09/Nov/2019 14:28:18] "POST /api/users/wx_login HTTP/1.1" 500 -

Traceback (most recent call last):

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 2309, in __call__

    return self.wsgi_app(environ, start_response)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 2295, in wsgi_app

    response = self.handle_exception(e)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1741, in handle_exception

    reraise(exc_type, exc_value, tb)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\_compat.py", line 35, in reraise

    raise value

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 2292, in wsgi_app

    response = self.full_dispatch_request()

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request

    rv = self.handle_user_exception(e)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1718, in handle_user_exception

    reraise(exc_type, exc_value, tb)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\_compat.py", line 35, in reraise

    raise value

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request

    rv = self.dispatch_request()

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1799, in dispatch_request

    return self.view_functions[rule.endpoint](**req.view_args)

  File "D:\learning\Python\Tomorrow\KittyCode\lesson21\Idiom\flask\app\api\__init__.py", line 66, in wx_login

    member = Member.query.filter_by(openid=openid).first()

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\orm\query.py", line 2895, in first

    ret = list(self[0:1])

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\orm\query.py", line 2687, in __getitem__

    return list(res)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\orm\query.py", line 2995, in __iter__

    return self._execute_and_instances(context)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\orm\query.py", line 3018, in _execute_and_instances

    result = conn.execute(querycontext.statement, self._params)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 948, in execute

    return meth(self, multiparams, params)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\sql\elements.py", line 269, in _execute_on_connection

    return connection._execute_clauseelement(self, multiparams, params)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 1060, in _execute_clauseelement

    compiled_sql, distilled_params

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 1200, in _execute_context

    context)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 1413, in _handle_dbapi_exception

    exc_info

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\util\compat.py", line 265, in raise_from_cause

    reraise(type(exception), exception, tb=exc_tb, cause=cause)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\util\compat.py", line 248, in reraise

    raise value.with_traceback(tb)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 1193, in _execute_context

    context)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\default.py", line 509, in do_execute

    cursor.execute(statement, parameters)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\pymysql\cursors.py", line 170, in execute

    result = self._query(query)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\pymysql\cursors.py", line 328, in _query

    conn.query(q)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\pymysql\connections.py", line 516, in query

    self._affected_rows = self._read_query_result(unbuffered=unbuffered)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\pymysql\connections.py", line 727, in _read_query_result

    result.read()

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\pymysql\connections.py", line 1066, in read

    first_packet = self.connection._read_packet()

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\pymysql\connections.py", line 683, in _read_packet

    packet.check_error()

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\pymysql\protocol.py", line 220, in check_error

    err.raise_mysql_exception(self._data)

  File "C:\Users\wwl.ARCVIDEO\AppData\Local\Programs\Python\Python36\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception

    raise errorclass(errno, errval)

sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'member \nWHERE member.openid = 'oXvvX5TRNg69XacCNTt0xj6HDWwo' \n LIMIT 1' at line 2") [SQL: 'SELECT member.id AS member_id, member.openid AS member_openid, member.nickname AS member_nickname, member.avatar AS member_avatar, member.sesion AS member_sesion, member.addtime AS member_addtime \nFROM member \nWHERE member.openid = %(openid_1)s \n LIMIT %(param_1)s'] [parameters: {'openid_1': 'oXvvX5TRNg69XacCNTt0xj6HDWwo', 'param_1': 1}] (Background on this error at: http://sqlalche.me/e/f405)


分享到:
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照