{"action":"created","issue":{"url":"https://api.github.com/repos/xuelangZF/NaHan/issues/13","repository_url":"https://api.github.com/repos/xuelangZF/NaHan","labels_url":"https://api.github.com/repos/xuelangZF/NaHan/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/xuelangZF/NaHan/issues/13/comments","events_url":"https://api.github.com/repos/xuelangZF/NaHan/issues/13/events","html_url":"https://github.com/xuelangZF/NaHan/issues/13","id":193089393,"number":13,"title":"运行报没有数据库的错误","user":{"login":"yisake","id":4221944,"avatar_url":"https://avatars.githubusercontent.com/u/4221944?v=3","gravatar_id":"","url":"https://api.github.com/users/yisake","html_url":"https://github.com/yisake","followers_url":"https://api.github.com/users/yisake/followers","following_url":"https://api.github.com/users/yisake/following{/other_user}","gists_url":"https://api.github.com/users/yisake/gists{/gist_id}","starred_url":"https://api.github.com/users/yisake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yisake/subscriptions","organizations_url":"https://api.github.com/users/yisake/orgs","repos_url":"https://api.github.com/users/yisake/repos","events_url":"https://api.github.com/users/yisake/events{/privacy}","received_events_url":"https://api.github.com/users/yisake/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-02T11:01:16Z","updated_at":"2016-12-08T12:32:07Z","closed_at":null,"body":"数据库需要怎么初始化啊。。。\r\n\r\nsqlalchemy.exc.OperationalError\r\nOperationalError: (_mysql_exceptions.OperationalError) (1049, \"Unknown database 'nahan'\")\r\n\r\nTraceback (most recent call last)\r\nFile \"C:\\NaHan\\lib\\site-packages\\flask\\app.py\", line 2000, in __call__\r\nreturn self.wsgi_app(environ, start_response)\r\nFile \"C:\\NaHan\\lib\\site-packages\\flask\\app.py\", line 1991, in wsgi_app\r\nresponse = self.make_response(self.handle_exception(e))\r\nFile \"C:\\NaHan\\lib\\site-packages\\flask\\app.py\", line 1567, in handle_exception\r\nreraise(exc_type, exc_value, tb)\r\nFile \"C:\\NaHan\\lib\\site-packages\\flask\\app.py\", line 1988, in wsgi_app\r\nresponse = self.full_dispatch_request()\r\nFile \"C:\\NaHan\\lib\\site-packages\\flask\\app.py\", line 1641, in full_dispatch_request\r\nrv = self.handle_user_exception(e)\r\nFile \"C:\\NaHan\\lib\\site-packages\\flask\\app.py\", line 1544, in handle_user_exception\r\nreraise(exc_type, exc_value, tb)\r\nFile \"C:\\NaHan\\lib\\site-packages\\flask\\app.py\", line 1639, in full_dispatch_request\r\nrv = self.dispatch_request()\r\nFile \"C:\\NaHan\\lib\\site-packages\\flask\\app.py\", line 1625, in dispatch_request\r\nreturn self.view_functions[rule.endpoint](**req.view_args)\r\nFile \"D:\\Git\\NaHan\\nahan\\voice\\views.py\", line 28, in index\r\ntopics = topics_all[offset:offset + per_page]\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\orm\\query.py\", line 2457, in __getitem__\r\nreturn list(res)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\orm\\query.py\", line 2761, in __iter__\r\nreturn self._execute_and_instances(context)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\orm\\query.py\", line 2774, in _execute_and_instances\r\nclose_with_result=True)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\orm\\query.py\", line 2765, in _connection_from_session\r\n**kw)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\orm\\session.py\", line 893, in connection\r\nexecution_options=execution_options)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\orm\\session.py\", line 898, in _connection_for_bind\r\nengine, execution_options)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\orm\\session.py\", line 334, in _connection_for_bind\r\nconn = bind.contextual_connect()\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 2039, in contextual_connect\r\nself._wrap_pool_connect(self.pool.connect, None),\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 2078, in _wrap_pool_connect\r\ne, dialect, self)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 1405, in _handle_dbapi_exception_noconnection\r\nexc_info\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\util\\compat.py\", line 202, in raise_from_cause\r\nreraise(type(exception), exception, tb=exc_tb, cause=cause)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 2074, in _wrap_pool_connect\r\nreturn fn()\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\pool.py\", line 376, in connect\r\nreturn _ConnectionFairy._checkout(self)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\pool.py\", line 713, in _checkout\r\nfairy = _ConnectionRecord.checkout(pool)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\pool.py\", line 480, in checkout\r\nrec = pool._do_get()\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\pool.py\", line 1060, in _do_get\r\nself._dec_overflow()\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\util\\langhelpers.py\", line 60, in __exit__\r\ncompat.reraise(exc_type, exc_value, exc_tb)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\pool.py\", line 1057, in _do_get\r\nreturn self._create_connection()\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\pool.py\", line 323, in _create_connection\r\nreturn _ConnectionRecord(self)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\pool.py\", line 449, in __init__\r\nself.connection = self.__connect()\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\pool.py\", line 607, in __connect\r\nconnection = self.__pool._invoke_creator(self)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\engine\\strategies.py\", line 97, in connect\r\nreturn dialect.connect(*cargs, **cparams)\r\nFile \"C:\\NaHan\\lib\\site-packages\\sqlalchemy\\engine\\default.py\", line 385, in connect\r\nreturn self.dbapi.connect(*cargs, **cparams)\r\nFile \"C:\\NaHan\\lib\\site-packages\\MySQLdb\\__init__.py\", line 81, in Connect\r\nreturn Connection(*args, **kwargs)\r\nFile \"C:\\NaHan\\lib\\site-packages\\MySQLdb\\connections.py\", line 193, in __init__\r\nsuper(Connection, self).__init__(*args, **kwargs2)\r\nOperationalError: (_mysql_exceptions.OperationalError) (1049, \"Unknown database 'nahan'\")\r\nThe debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.\r\nTo switch between the interactive traceback and the plaintext one, you can click on the \"Traceback\" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.\r\n\r\nYou can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:\r\n\r\ndump() shows all variables in the frame\r\ndump(obj) dumps all that's known about the object\r\n"},"comment":{"url":"https://api.github.com/repos/xuelangZF/NaHan/issues/comments/265729482","html_url":"https://github.com/xuelangZF/NaHan/issues/13#issuecomment-265729482","issue_url":"https://api.github.com/repos/xuelangZF/NaHan/issues/13","id":265729482,"user":{"login":"yisake","id":4221944,"avatar_url":"https://avatars.githubusercontent.com/u/4221944?v=3","gravatar_id":"","url":"https://api.github.com/users/yisake","html_url":"https://github.com/yisake","followers_url":"https://api.github.com/users/yisake/followers","following_url":"https://api.github.com/users/yisake/following{/other_user}","gists_url":"https://api.github.com/users/yisake/gists{/gist_id}","starred_url":"https://api.github.com/users/yisake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yisake/subscriptions","organizations_url":"https://api.github.com/users/yisake/orgs","repos_url":"https://api.github.com/users/yisake/repos","events_url":"https://api.github.com/users/yisake/events{/privacy}","received_events_url":"https://api.github.com/users/yisake/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T12:32:07Z","updated_at":"2016-12-08T12:32:07Z","body":"等我扩展点自己的东西再看看这个，请教一个问题，请求这个http://127.0.0.1:5000/nodes是有什么用啊？\r\n节点是用来？小弟刚学flask不久。。。"}}
{"actor":{"display_login":"yisake"}}